0
votes

I have a FlowPane with many BorderPanes as windows. I would like to display something like water mark or label <empty> when the FlowPane is empty.

Is there any solution?

1

1 Answers

3
votes

Have you tried something like this:

FlowPane flowPane = ... ;

StackPane container = new StackPane();
Label placeHolder = new Label("No content in flow pane");
placeHolder.visibleProperty().bind(Bindings.isEmpty(flowPane.getChildren()));
container.getChildren().addAll(flowPane, placeHolder);

Then, obviously, just add the container into your UI where you previously added the flow pane.