tp3
This commit is contained in:
@@ -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){
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user