Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

NAME:KARAKA.

RUPASREE
REGISTRATION NUMBER:20BCI7108
CODE:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class RUPA extends Application


{
public void start(Stage primaryStage) throws Exception
{
Label l =new Label("Choose any four:");
CheckBox c1=new CheckBox("Maths");
CheckBox c2=new CheckBox("Physics");
CheckBox c3=new CheckBox("Chemistry");
CheckBox c4=new CheckBox("English");
CheckBox c5=new CheckBox("Sanskrit");
VBox r=new VBox();
Scene s=new Scene(r,400,400);
r.getChildren().addAll(l,c1,c2,c3,c4,c5);
r.setSpacing(10);
primaryStage.setScene(s);
primaryStage.setTitle("Javafx with CheckBox");
primaryStage.show();
}
public static void main(String[] args)
{
launch(args);
}
}

OUTPUT:

You might also like