0

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 ?

0

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

2 Comments

Is it possible to add whole java7 (like single jar) to sbt ?
I don't believe so, but you could add scalacOptions += "-target:jvm-1.7" to get a better error? stackoverflow.com/questions/19208942/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.