Scony
Scony

Reputation: 4138

SBT - missing dependency

Well, my collaborator run code under build.sbt shown below without any problems while I get:

[error] /.../GameMap.scala:91: value revalidate is not a member of javax.swing.JFrame
[error]     frame.revalidate()
[error]           ^
[error] /.../GameMap.scala:92: value revalidate is not a member of java.awt.Container
[error]     frame.getContentPane.revalidate()
[error]                          ^

I suspect, something is missing in build.sbt:

scalaVersion := "2.10.4"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

// scalacOptions ++= Seq("-feature")                                                                                                                                    

libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.3.8",
  "com.typesafe.akka" %% "akka-cluster" % "2.3.8",
  "org.scala-lang" % "scala-swing" % "2.10.4"
)

What is it ?

Upvotes: 0

Views: 294

Answers (1)

Justin Pihony
Justin Pihony

Reputation: 67075

My guess is that your running Java 6 and your collaborator is running Java 7

This is the Container documentation for java 6, which does not list a revalidate method inherited from Component.

And here is the java 7 documentation, which DOES list a revalidate method being inherited from Component

*The same can be stated for swing

Upvotes: 2

Related Questions