I have managed to load a child fxml(sub UI) under a parent fxml (mainMenu UI). I have created an AnchorPane with id \"mainContent\". This pane is bound to 4 sides and change
If you set the static methods setTopAnchor( child, value ), setBottomAnchor( ... ), setLeftAnchor( ... ), setRightAnchor( ... ) of class AnchorPane to 0.0, the child Node will get stretched to the full extend of the parent AnchorPane.
Documentation Link: AnchorPane
edit: in the documentation link you can also see how you can set these values in your java code.
FXML example: