Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4005774
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:26:05+00:00 2026-05-20T08:26:05+00:00

I know that the scala swing libraries are present in scala 2.8: [info] Building

  • 0

I know that the scala swing libraries are present in scala 2.8:

[info] Building project chart 1.0 against Scala 2.8.1
[info]    using sbt.DefaultProject with sbt 0.7.4 and Scala 2.7.7

So how come I’m getting this error:

[error] /src/main/scala/Chart.scala:2: value swing is not a member of package scala
[error] import scala.swing.Panel

Is it because SBT is using the wrong version of scala (i.e. 2.7.7)? If so, how do I configure it to use the correct version?

EDIT: Answer

Following Dylan Lacey’s answer, I made the following file sbt/project/build/chart.scala:

import sbt._

class SamplesProject(info: ProjectInfo) extends DefaultProject(info)
{
   val scalaSwing = "org.scala-lang" % "scala-swing" % "2.8.1"
}

Then I ran: sbt reload update from the shell.

Now things compile!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:26:06+00:00Added an answer on May 20, 2026 at 8:26 am

    No. The version information reported on line 2 is just the version sbt was built with, it won’t effect your build.

    Because Swing is a package (Not part of the base classes) I suspect the problem is one of two things. Either:

    1. Your build file doesn’t specify that you want to use scala-swing and is getting confused. You can correct this by adding:

      val scalaSwing = "org.scala-lang" % "scala-swing" % "packageVersion"

      in your /project/build/projectName.scala (Thanks Janx!)

    2. You’ve added the dependancy but have not yet downloaded the required package. To do this, you need sbt to reload your project definition and then get all required packages:

      sbt reload update

    If you need option 1, you’ll likely need to also do option 2.

    If neither of these work, you may have confused your local respository horribly. That can be fixed with a sbt clear-lib, but you will then re-download all your packages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have played around with Scala for a while now, and I know that
(Yes I know I can call Java code from Scala; but that is pointless;
I know that it's possible to implicitly provide asynchronous interaction using: Asynchronous Delegates Asynchronous
I know that this has already been asked here but the answer (using a
Now that I know how to parse xml in scala as a stream I
I know that you can mark a scala object as @serializable , but I
I know that there are exist established frameworks written in Scala for web development
Alright, I know that Scala allwos no aux cons type params. What if I
I use eclipse as my scala ide. And I know that in java I
I know that objects are treated pretty much like singletons in scala. However, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.