October 2017
Beginner
318 pages
7h 26m
English
To let users click on our button field and perform some coded action, we're going to assign an event handler to our actionPerformed event. If we click on this field, we get an option already. Our GUI designer is suggesting we add a handler, namely jButton1ActionPerformed. That's an awful name for a method that's going to sit in our code; jBbutton1 is pretty nondescript. However, it has been chosen because it is the variable name assigned to jButton when it's created in the actual Java code:
// Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JPasswordField ...
Read now
Unlock full access