3、Group

布局组件

Group group = new Group();
Button btn1 = new Button("btn1");
Button btn2 = new Button("btn2");
Button btn3 = new Button("btn3");
//添加组件
group.getChildren().addAll(btn1,btn2,btn3);
//移除指定组件
group.getChildren().remove(btn1);
Scene scene = new Scene(group);
primaryStage.setScene(scene);

//设置透明度(会影响子组件)
group.setOpacity(0.5);
//检测在指定位置上是否有子组件(只能检测到子组件的左上角点)
group.contains(0,0);