Creating a JavaFX desktop GUI application
We will be building a simple desktop application in Kotlin, that makes use of the JavaFX GUI desktop toolkit. JavaFX is the newest GUI toolkit that is supplied with most popular versions of the Java Runtime Environment (JRE). JavaFX is supplied with Java for Windows, macOS, and desktop-based Linux versions. JavaFX was initially supplied with the Java SE Embedded 8 version that is preinstalled on the Raspberry Pi's Raspbian operating system, but unfortunately Oracle removed it from later updates. It is also not available for Solaris users.
Note
Oracle made the source code of JavaFX for Java SE Embedded available via an open source license, so advanced users can still compile and run JavaFX-based applications on the Raspberry Pi. This use case is out of scope of this chapter, though.
It's strongly recommended to have the JavaFX documentation nearby while developing the project in this chapter. It can be found at the following link: