Loading scene

With JavaFx, there are two ways of defining UI elements. One is using Kotlin (or Java) code to create UI control class instances and then styling them and positioning them programmatically. The other way is using FXML, which is an XML-based markup language.

With FXML, we can separate the presentation part of our app from the application logic part and that's why we'll use it for our UI.

FXML doesn't have a schema, it maps directly to JavaFx control classes. This means that you don’t have to learn FXML, you can look into the JavaFx documentation and see what controls are available and what properties they offer. The full documentation of the API is available here: https://docs.oracle.com/javase/8/javafx/api/toc.htm.

Let's start ...

Get Kotlin Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.