gpt4 book ai didi

JavaFX - 如何清除 anchorPane 中的所有节点

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:44:32 25 4
gpt4 key购买 nike

我正在使用 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();

关于JavaFX - 如何清除 anchorPane 中的所有节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30008005/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com