Skip to content

Instantly share code, notes, and snippets.

@nafg
Last active May 26, 2017 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nafg/b51c7a9c1c8022ba3ac5f2a45eb1d62d to your computer and use it in GitHub Desktop.
Save nafg/b51c7a9c1c8022ba3ac5f2a45eb1d62d to your computer and use it in GitHub Desktop.
Binding.scala FXML bug
scalaVersion in ThisBuild := "2.11.8"
libraryDependencies += "com.thoughtworks.binding" %% "fxml" % "11.0.0-M2"
libraryDependencies += "org.scala-lang.modules" % "scala-xml_2.11" % "1.0.6"
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
import javafx.application.Application
import javafx.scene.Scene
import javafx.scene.control._
import javafx.stage._
import com.thoughtworks.binding._
class FxmlSample extends Application {
@fxml override def start(primaryStage: Stage): Unit = {
val scene: Binding[Scene] = <Scene>
<Label>Hello, World!</Label>
</Scene>
fxml.show(primaryStage, scene)
}
}
object FxmlSample {
def main(args: Array[String]): Unit = {
Application.launch(classOf[FxmlSample], args: _*)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment