JavaFx清空面板(Pane)中的结点

版权声明:就是码字也不容易啊 https://blog.csdn.net/qq_40946921/article/details/84347201
GridPane p=new GridPane();
p.getChildren().clear();        //清空面板
p.getChildren().remove(int index);   //根据下标去除结点
p.getChildren().remove(Node );        //去除node结点
p.getChildren().remove(int form,int to);  //根据范围去除结点
p.getChildren().removeAll(Node...elements) //根据一个Node组去除结点

猜你喜欢

转载自blog.csdn.net/qq_40946921/article/details/84347201