7
如何循環控制場景? 我試着用getChildrenUnmodifiable(),但它只返回第一級的子級。JavaFX循環場景控件
public void rec(Node node){
f(node);
if (node instanceof Parent) {
Iterator<Node> i = ((Parent) node).getChildrenUnmodifiable().iterator();
while (i.hasNext()){
this.rec(i.next());
}
}
}