In this recipe, we will look at creating a simple GUI application, using JavaFX controls. We will build an app that will help you compute your age, after you provide your date of birth. Optionally, you can even enter your name, and the app will greet you and display your age. It is a pretty simple example that tries to show how you can create a GUI by using layouts, components, and event handling.
Creating a GUI using JavaFX controls
Getting ready
The following are the modules part of JavaFX:
- javafx.base
- javafx.controls
- javafx.fxml
- javafx.graphics
- javafx.media
- javafx.swing
- javafx.web
If you are using Oracle JDK 10 and 9, it comes with the previously mentioned JavaFX modules as part of the setup; that is to say, you can find...