Files
DEV/DEV.3.1/TP/TP3/ex1/Controleur.java

19 lines
374 B
Java
Raw Normal View History

2025-09-30 11:15:03 +02:00
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Controleur extends WindowAdapter {
@Override
public void windowClosing(WindowEvent evenement) {
2025-09-30 11:38:19 +02:00
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("");
}
2025-09-30 11:15:03 +02:00
}
2025-09-30 11:38:19 +02:00
}