JavaFX - How to clear all nodes from anchorPane

I am using scriptBuilder.

How do I clear the AnchorPane?
Is there a way to remove all the nodes contained in the AnchorPane (already created from the sceneBuilder and filled with buttons and shapes)?

+3


source to share


1 answer


The AnchorPane nodes are listed. So you can do this:



myPane.getChildren().clear();

      

+5


source







All Articles