importjavafx.application.Application;importjavafx.scene.Group;importjavafx.scene.Scene;importjavafx.scene.control.CheckBox;importjavafx.scene.layout.VBox;importjavafx.scene.paint.Color;importjavafx.stage.Stage;publicclassMainextendsApplication{publicstaticvoidmain(String[]args){launch(args);}privateGroupcreateRootGroup(){CheckBoxcb1=newCheckBox("First");CheckBoxcb2=newCheckBox("Second");CheckBoxcb3=newCheckBox("Third");// Align verticallyVBoxvbox=newVBox();vbox.setSpacing(10);vbox.getChildren().add(cb1);vbox.getChildren().add(cb2);vbox.getChildren().add(cb3);// Add to the rootGrouproot=newGroup();root.getChildren().add(vbox);returnroot;}@Overridepublicvoidstart(StageprimaryStage){Grouproot=createRootGroup();Scenescene=newScene(root,200,150,Color.IVORY);primaryStage.setScene(scene);primaryStage.show();}}