I've tried to use scala.swing package, but it can't be found. The compiler (2.9.1) says "swing is not a member of scala". Any ideas? Everything else seems working Ok, I haven't experienced any problems with other Scala packages.
1 Answer
So, to wrap up the solution. First of all you need to define dependency on swing library. Add the following to your build.sbt file:
libraryDependencies += "org.scala-lang" % "scala-swing" % "2.9.0-1" If you're using Intellij IDEA, with sbt-idea plugin, invoke gen-idea to rebuild project to let IDEA know about swing.
2 Comments
Ivan
"2.9.1" instead of "2.9.0-1" in my case.
Jean-Philippe Pellet
You can use
scalaVersion.value instead of hard-coding a Scala version here.
swingas a dependency?scalanamespace always included by default?"org.scala-lang" % "scala-swing" % "2.9.0-1". Somebody could clarify, if swing part of scala standart lib or not.