How to fill in the empty space when the component is not displayed or hidden?

I have several components in BorderPane that may or may not be visible. When I set the component not visible, I get an empty space that I want to fill by resizing the next component. What are the available options for setting components to fill in the empty space if the component is set to .setVisible(false); ?

+4
source share
2 answers

You also need to call setManaged (false).

+16
source

You can use bindings to automatically configure a managed property based on visibility. For instance. component.managedProperty().bind(component.visibleProperty());

+3
source

Source: https://habr.com/ru/post/1489126/


All Articles