JavaFX - 如何清除 anchorPane 中的所有节点
JavaFX - How to clear all the nodes from an anchorPane
我正在使用 sceneBuilder。
How to clear an AnchorPane ?
Is there a way to delete all the
nodes contained in an AnchorPane (already created from sceneBuilder and populated with buttons and shapes) ?
AnchorPane 的节点在列表中。所以你可以这样做:
myPane.getChildren().clear();
我正在使用 sceneBuilder。
How to clear an AnchorPane ?
Is there a way to delete all the nodes contained in an AnchorPane (already created from sceneBuilder and populated with buttons and shapes) ?
AnchorPane 的节点在列表中。所以你可以这样做:
myPane.getChildren().clear();