update
This commit is contained in:
19
DEV.3.1/TP/TP3/ex1/Controleur.java
Normal file
19
DEV.3.1/TP/TP3/ex1/Controleur.java
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user