Search code examples
javafx-2javafxjavafx-8

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);?


Solution

  • You need to call setManaged(false) as well.