I want to programmatically add and remove side menu in BorderPane
.
Problem is when I add a Node
, it is not visible.
BorderPane
and StackPane
are defined in FXML file.
I want to do something like this:
StackPane temp = (StackPane) borderPane.getChildren().get(1);
borderPane.getChildren().remove(1);
borderPane.getChildren().add(0, temp);
I have tried borderPane.requestLayout()
but it is not working.