Bonsoir,
Je débute en Java avec l'interface graphique de NetBeans, j'essaie tout simplement de fermer la fenêtre lors du clic de l'user sur le bouton Effacer, sauf qu'il ne se passe rien ...
Pouvez-vous m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 public class auth extends javax.swing.JFrame { /** * Creates new form auth */ public auth() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") private void buttonSeConnecterActionPerformed(java.awt.event.ActionEvent evt) { } private void buttonEffacerActionPerformed(java.awt.event.ActionEvent evt) { System.exit(0); } /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { new auth().setVisible(true); } }); } } // Variables declaration - do not modify private javax.swing.JButton buttonEffacer; private javax.swing.JButton buttonSeConnecter; private javax.swing.JLabel jLabel1; private javax.swing.JLabel labelConnexion; private javax.swing.JLabel labelIdentifiant; private javax.swing.JLabel labelMdp; private javax.swing.JLabel labelOublieMdp1; private javax.swing.JLabel labelOublieMdp2; private javax.swing.JLabel label; private javax.swing.JPanel panelConnexion; private javax.swing.JPasswordField passwordFieldMdp; private javax.swing.JTextField textFieldIdentifiant; // End of variables declaration }
Partager