
Envoyé par
michaeljeru
j'ai essayé avec le frame.setDefaultCloseOperation(Frame.EXIT_ON_CLOSE);, mais ça me sort une erreur "Variable EXIT_ON_CLOSE cannot be resolved", pourtant, EXIT_ON_CLOSE d'après la javadoc est une constante définie dans javax.swing.JFrame, et j'ai un import javax.swing.* en haut de classe.
Une explication?
Tu veux importer JFrame et tu utilises Frame??? Ou c'est une faute de frappe?
Essaye plutôt celui de WindowConstants de toute façon...
frame.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
Partager