debut sauvegarde des modif

This commit is contained in:
2022-11-13 19:58:10 +01:00
parent 323c6e43e2
commit c3d4688cd3
4 changed files with 18 additions and 4 deletions

View File

@@ -25,8 +25,9 @@ public class ObservateurFenetre implements WindowListener{
@Override
public void windowClosing(WindowEvent e) {
JFrame fenetre= (JFrame) e.getSource();
int confirmation = JOptionPane.showConfirmDialog(fenetre.getContentPane(), "Etes-vous sûr de vouloir fermer la fenetre ?", "Quitter", JOptionPane.YES_NO_OPTION);
if(confirmation != JOptionPane.OK_OPTION) return;
int confirmation = JOptionPane.showConfirmDialog(fenetre.getContentPane(), "Voulez vous auvegarder Avant de quitter?", "Quitter", JOptionPane.YES_NO_OPTION);
if(confirmation != JOptionPane.OK_OPTION);
fenetre.dispose();
}