Écouteur d'action pour le bouton pour fermer la fenêtre java
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
Energetic Eland
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));