update
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.event.WindowListener;
|
||||
import javax.swing.*;
|
||||
|
||||
public class Controleur extends WindowAdapter {
|
||||
|
||||
public Controleur() {
|
||||
|
||||
}
|
||||
|
||||
// avant fermeture
|
||||
@Override
|
||||
public void windowClosing(WindowEvent evenement) {
|
||||
JOptionPane.showConfirmDialog(null, "Êtes-vous sûr de vouloir fermer cette fenêtre ?");
|
||||
System.exit(0);
|
||||
int choice = JOptionPane.showConfirmDialog(null, "Êtes-vous sûr de vouloir fermer cette fenêtre ?");
|
||||
if(choice == 0) {
|
||||
System.exit(0);
|
||||
} else {
|
||||
System.out.println("");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user