JavaFX scene builder starts editing an AnchorPane.
JavaFX doesn't require the root Node to be an AnchorPane, there are cases in which another class is preferrable.
Is there a way to change the rooot container in JavaFX Scene Builder?
Choose menu Item:
File | New with Root Container
With b44 of the SceneBuilder, options available are Anchor Pane, Border Pane or Stack Pane
You can also directly edit the fxml in a text editor to set the root pane to for instance a Flow Pane, then load the edited fxml into the SceneBuilder and the SceneBuilder will recognize it.
To set another pane as root rather than the three altneratives available under New with root container > ...
(without editing the fxml directly), do the following:
Edit > Trim document to selection
.Voila!
Tip: Use the menu selections: Arrange > Wrap in > ...
and Arrange > Unwrap
to insert or remove containers around child items.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With