@@ 17,8 17,10 @@ import javafx.stage.Stage;
import javafx.stage.FileChooser;
import static javafx.application.Application.launch;
import javafx.application.Platform;
+import javafx.event.EventHandler;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
+import javafx.stage.WindowEvent;
/**
*
@@ 42,6 44,14 @@ public class Main extends Application {
@Override
public void start(Stage stage) throws Exception {
+
+ stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
+ @Override
+ public void handle(WindowEvent t) {
+ Platform.exit();
+ System.exit(0);
+ }
+ });
theStage = stage;
File file = null;