import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; public class App extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) throws Exception { Button goButton = new Button("Mehet"); goButton.setOnAction(e -> { boolean result = DlgBox.show("cím", "Biztos?"); System.out.println("válasz: " + result); }); StackPane root = new StackPane(); root.getChildren().add(goButton); Scene scene1 = new Scene(root, 300, 250); primaryStage.setScene(scene1); primaryStage.show(); } }