import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class PlatformExitBug extends Application { @Override public void start(final Stage stage) { VBox root = new VBox(); final Scene scene = new Scene(root, 400, 300); Button closeButton = new Button("Close"); closeButton.setOnAction(e -> stage.close()); root.getChildren().add(closeButton); stage.setScene(scene); stage.show(); } public static void main(final String[] args) { Application.launch(args); } }