As the title says, my question is, how can I prevent/cancel closing of primary stage in JavaFX 2.2? I have done some research on Google, and the following two links seemed t
I have used following code in my application and it works perfectly,
Platform.setImplicitExit(false); primaryStage.setOnCloseRequest(new EventHandler() { @Override public void handle(WindowEvent event) { event.consume(); } });