好吧,我的协作者在build.sbt下面运行代码而没有任何问题,我得到了:
[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] ^
我怀疑,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"
)
这是什么?
答案 0 :(得分:2)
我的猜测是你正在运行的Java 6和你的协作者正在运行Java 7
This is the Container documentation for java 6,未列出从revalidate
继承的Component
方法。
And here is the java 7 documentation,其中列出了从revalidate
继承的Component
方法
* swing