All the FXML syntax we have already used in this chapter was very self-explanatory (another benefit of FXML!) but, there are additional useful options which we will review in the following sections.
Syntax details of FXML
Reviewing the basics of FXML
Let's briefly review the basics we learned at the beginning of this chapter:
- Tags correspond to JavaFX classes and attributes correspond to these classes' properties
- By setting the fx:id attribute, you can link a field from the Controller to these tags
- You can set the Controller by the fx:controller attribute of the root node
- Action handlers can be linked using the # symbol
Take a look at the following code snippet:
<HBox alignment="CENTER" spacing="...