3
votes

I am trying to clear an HBox from its items. I tried using hBox.getChildren().clear(), and even looping

for(Node child: hBox.getChildren()){
    hBox.getChildren().remove(child);
}

but neither one works. Any ideas?

1

1 Answers

1
votes

The remove version will give you a ConcurrentModificationException - clear should just work - at least it works for me