Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PizzaPane()
- {
- Font font = new Font(18);
- CheckBox cb1 = new CheckBox("Bacon");
- CheckBox cb2 = new CheckBox("Peppers");
- CheckBox cb3 = new CheckBox("Sausage");
- CheckBox cb4 = new CheckBox("Extra Cheese");
- CheckBox cb5 = new CheckBox("Ham");
- CheckBox cb6 = new CheckBox("Onions");
- Button push = new Button("Total!");
- push.setOnAction(this::processReturn);
- Label outputLabel = new Label("Property Output:");
- outputLabel.setFont(font);
- GridPane.setHalignment(outputLabel, HPos.RIGHT);
- result = new Label("---");
- result.setFont(font);
- GridPane.setHalignment(result, HPos.CENTER);
- setAlignment(Pos.CENTER);
- setHgap(50);
- setVgap(20);
- setStyle("-fx-background-color: yellow");
- setGridLinesVisible(false);
- add(cb1 , 1, 2);
- add(cb2 , 1, 3);
- add(cb3 , 1, 4);
- add(cb4 , 1, 5);
- add(cb5 , 1, 6);
- add(cb6 , 1, 7);
- add(push, 2, 0);
- add(outputLabel, 0, 1);
- add(result, 1, 1);
- }
- public void processReturn(ActionEvent event)
- {
- double fValue =(10);
- result.setText(fValue + "");
- }
Add Comment
Please, Sign In to add comment