salut,

J'ai une JFrame qui possède ce listener:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent we) {
				Rectangle bounds = getBounds();
				prefs.putInt(X_POS, (int) bounds.getX());
				prefs.putInt(Y_POS, (int) bounds.getY());
				prefs.putInt(WIDTH, (int) bounds.getWidth());
				prefs.putInt(HEIGHT, (int) bounds.getHeight());
			}
		});
Je ajouter à ma JFrame un bouton "Quit".
Et je ne vois pas trop comment faire!!!
Je sais qu'il fait faire ça:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
quitButton.addActionListener(new ActionListener(){
 
			public void actionPerformed(ActionEvent e) {
 
			}
 
		});
mais que mettre dans le actionPerformed??

Quelqu'un peut m'aider??
Merci d'avance