This commit is contained in:
2024-09-18 17:24:33 +02:00
parent 4d7c490f87
commit ee94179c71
7 changed files with 42 additions and 35 deletions

View File

@@ -4,7 +4,7 @@ import java.awt.event.*;
import java.lang.*;
public class Boutons extends JPanel implements WindowListener{
public class Boutons extends JPanel{
public Boutons() {
super();
@@ -72,32 +72,4 @@ public class Boutons extends JPanel implements WindowListener{
this.add(five, gbc);
}
public void windowDeactivated(WindowEvent evenement){
}
public void windowActivated(WindowEvent evenement){
}
public void windowClosed(WindowEvent evenement){
}
public void windowClosing(WindowEvent evenement){
JOptionPane exit = new JOptionPane();
int rep = exit.showConfirmDialog(this, "Etes vous certain de vouloir quitter?", "Quitter", JOptionPane.YES_NO_OPTION);
if (rep == JOptionPane.YES_OPTION){
Main.fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
} else if (rep == JOptionPane.NO_OPTION){
Main.fenetre.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
}
}
public void windowDeiconified(WindowEvent evenement){
}
public void windowIconified(WindowEvent evenement){
}
public void windowOpened(WindowEvent evenement){
}
}