In some cases, you can skip declaring properties, such as children:
<?import javafx.scene.layout.*?><?import javafx.scene.control.*?><HBox xmlns:fx="http://javafx.com/fxml" fx:controller="chapter4.includes.FirstController"> <TextField fx:id="textField" /> <Button text="Button" onAction="#btnAction"/></HBox>
The most common properties are marked as default by the JavaFX API, and FXML allows us to skip them to remove obvious parts of the code.
You can detect such properties by looking into JavaDoc or the source code. They are set through the @javafx.beans.DefaultProperty annotation:
@DefaultProperty("children")public class Paneextends Region