mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-22 15:31:08 +00:00
[CLIENT] #18 : Le soft se ferme désormais complêtement lorsque la croix rouge est utilisée. Amélioration du comportement de fermeture (prise en compte des ImplicitExit)
This commit is contained in:
parent
83bddcd2aa
commit
f521c48d22
@ -2,6 +2,7 @@ package com.pqt.client;
|
||||
|
||||
import com.pqt.client.gui.FrameManager;
|
||||
import javafx.application.Application;
|
||||
import javafx.application.Platform;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class Main extends Application{
|
||||
@ -10,12 +11,20 @@ public class Main extends Application{
|
||||
launch(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
FrameManager fm = new FrameManager(primaryStage);
|
||||
private FrameManager fm;
|
||||
|
||||
primaryStage.setOnCloseRequest(event->fm.onCloseEvent());
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
fm = new FrameManager(primaryStage);
|
||||
|
||||
primaryStage.setOnCloseRequest(event-> Platform.exit());
|
||||
|
||||
fm.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(){
|
||||
if(fm!=null)
|
||||
fm.onCloseEvent();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user