In my dialog box i have a button.In it's action listener method what does this refer to ? Is it the reference of the button or the reference of the JDialog ? What i have noticed is that it is the reference of JDialog because when in my IDE i press this. all other components and the methods of containers like dispose
come up. If it is so,how it is the reference of JDialog ? It should be of JButton.
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
boolean rB_1 = jRadioButton1.isSelected();
boolean rB_2 = jRadioButton2.isSelected();
boolean rB_4 = jRadioButton4.isSelected();
if(rB_2)
new class_design().changeStatusOfMessageDisplayMode(true);
this.dispose(); // <-------- this one
}
The above code is called when a button named done
is clicked from jdialog