The control elements are included in the javafx.scene.control package (https://openjfx.io/javadoc/11/javafx.controls/javafx/scene/control/package-summary.html). There are more than 80 of them, including a button, text field, checkbox, label, menu, progress bar, and scroll bar to name a few. As we have mentioned already, each control element is a subclass of Node that has more than 200 methods. So, you can imagine how rich and fine-tuned a GUI can be, built using JavaFX. However, the scope of this book allows us to cover only a few elements and their methods.
We have already seen a button. Let's now use a label and a text field to create a simple form with input fields (first name, last name, and age) and a submit button. We will build it in steps. All the following code snippets are sequential sections of the start()method.
First, let's create controls...