JavaFX - Included fxml does increase in size when placed in borderpane center
Post by:Giedrius Stasiulis
I'm trying to include an additional fxml in a main fxml, border pane center. When I do this, the fxml gets included and shows in the center, but the fxml does not occupy the full width and height of the main fxml window.
In the SceneBuilder, if I add the TableView in the center of the borderpane, it acts as it should. Only when I include the fxml via code it does not.
Please help, what am I missing? Any help will be appreciated
This is what I need:
This is what I get:
FXML I want to add:
Post by:Daniel Demesmaecker
The problem is that you're using a borderpane, he leaves room on the sides for the expected other panes. If thhis is the only content you want to display, use a anchorpane
Post by:S Fox
i think that normally borderpane will hide the empty parts but since its inside of a tabbedPane thats probably why it breaks. The titledPane also acts weird when you put things in it, it shows a big gap and it disrespects the grow properties set on the child containers. You can fix some of this weirdness with css, but in your case its easier to just use a VBox instead of the borderpane.
This thread has been viewed 1602 times.
All times above are in ranch (not your local) time.
The current ranch time is Dec 14, 2018 05:47:36.