For this controller, is there any built-in way to access the node to which the controller is "connected" without specifying the FXML identifier and a specific annotation? I cannot find anything related to this in the official documentation or search on the Internet.
For example, how do I access HBox from org.example.FooController
<HBox xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.example.FooController">
<children>
<Button mnemonicParsing="false" text="Button" />
</children>
</HBox>
At the moment, I just gave node the FXML identifier "root", and then used the following in my controller, but it seems like I'm missing a trick ...
@FXML
private Node root
source
share