Simple example of a ScalaFX application using Simple-Build-Tool (SBT).
Branch master contains an example with the current Scala 3 syntax, branch Scala2 contains the same example with the old Scala 2 syntax.
src/main/scala/hello/ScalaFXHelloWorld.scala
- sample ScalaFX application.build.sbt
- the main SBT configuration file.project/build.properties
- version of SBT to use.project/plugins.sbt
- plugins used for creation of IDEA and Eclipse projects.
-
Install Java 17 JDK or newer. If you are want to use Java 8 look at the SFX-8 branch of this project.
-
Install SBT
-
Run the example: change to the directory containing this example and use SBT to build and run the example:
%> sbt run
It will download needed dependencies, including Scala and ScalaFX, and run the example code.
Detailed description of similar example can be found in the blog post "Getting Started with ScalaFX: Compile and Run" .
Gradle version of this example can be found in ScalaFX-Hello-World-Gradle