I can have FXML file with root tag:
<BorderPane fx:id="mypane" fx:controller="my.package.MyController"
xmlns="http://javafx.com/javafx/8.0.91" xmlns:fx="http://javafx.com/fxml/1" />
And I can autowire it into controller
public class MyController {
@FXML
BorderPane mypane;
}
But can I do the same without assigning fx:id
? The control is topmost, then what is the need to name it? Can I refer it as "root" somehow?