I have two jframe, one is a main frame used to call check box frame, and another one is a jframe containing checkbox.
MainFrame.java
How to remember previous checked checkbox after main frame call again the checkbox frame?
CheckBox.java
below is my button action code:
private void btn_callCheckBoxActionPerformed(
java.awt.event.ActionEvent evt) {
//call checkbox window
CheckBoxWindow cbw = new CheckBoxWindow();
cbw.setVisible(true);
cbw.setEnabled(true);
this.setVisible(true);
this.setEnabled(false);
}
call mainframe from checkbox frame
private void btn_callMainFrameActionPerformed(
java.awt.event.ActionEvent evt) {
//call main frame window
MainPage mp = new MainPage();
mp.setVisible(true);
mp.setEnabled(true);
this.setEnabled(false);
this.setVisible(false);
}