Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fill empty space when component is not visible or hidden?

I have several components into BorderPane which can be visible or not using checkbox. When I set component not to be visible I get empty space which I want to fill by resizing the next component. What are the available options to configure the components to fill the empty space when component is set to .setVisible(false);?

like image 368
user1285928 Avatar asked Jul 01 '13 15:07

user1285928


Video Answer


2 Answers

You need to call setManaged(false) as well.

like image 68
tomsontom Avatar answered Oct 20 '22 18:10

tomsontom


You can take advantage of bindings to set managed property automatically based on visibility. E.g. component.managedProperty().bind(component.visibleProperty());

like image 22
Ceco Avatar answered Oct 20 '22 18:10

Ceco