salut,
J'ai une JFrame qui possède ce listener:
Je ajouter à ma JFrame un bouton "Quit".
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()); } });
Et je ne vois pas trop comment faire!!!
Je sais qu'il fait faire ça:
mais que mettre dans le actionPerformed??
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) { } });
Quelqu'un peut m'aider??
Merci d'avance
Partager