VBox content = new VBox(16);content.getChildren().addAll( new JHeader("Confirm Action", 3), new JLabel("Are you sure you want to proceed?"), new HBox(12, new JButton("Cancel").setOnAction(e -> modal.close()), new JButton("Confirm").addClass("btn-primary") ));JModal modal = new JModal(content);modal.show();
VBox form = new VBox(16);form.getStyleClass().add("modal-content");form.setPadding(new Insets(24));form.getChildren().addAll( new JHeader("Edit Profile", 2), new JInput().setLabel("Name"), new JInput().setLabel("Email"), new HBox(12, new JButton("Cancel") .addClass("btn-secondary") .setOnAction(e -> modal.close()), new JButton("Save") .addClass("btn-primary") .setOnAction(e -> { saveProfile(); modal.close(); }) ));JModal modal = new JModal(form, JModal.Size.MEDIUM);modal.show();