title: Save Checkbox state in a Panel/Dialog
body: <p>I am new to swings and I have one doubt:</p>
  
  <p>I have one dialog box, in that dialog, there is one Check Box, Ok and Cancel buttons.
  suppose user selected checkbox and click ok button, when user opens again that dialog box, the check box should be as selected. </p>
  
  <p>can anyone give idea, how to implment this.</p>
  
  <p>I know I can do this by using setSelected(true) and setSelected(false) methods.</p>
  
  <p>but how to save the state of the check box.</p>