title: Multiple JFrames
body: <p>I am making an application for processing customer orders(in java).
  My program has 3 <code>JFrame</code> windows (Yes I know its not a good idea to use multiple frames, but they aren't really connected to each other).</p>
  
  <ol>
  <li>Main one: Here you select what you are (Customer or Operator) </li>
  <li>Customer <code>JFrame</code></li>
  <li>Operator <code>JFrame</code></li>
  </ol>
  
  <p>After a Customer makes an order ( main frame > customer frame > complete order(button). I am doing something like this:</p>
  
  <pre><code>customerframe.dispose();
  customerframe.revalidate();
  customerframe.repaint();
  reloadframe(); ///a method which reinitializes the frame (Note: I am doing a frame=new JFrame()  here)
  mainframe.setVisible(true);
  </code></pre>
  
  <p>I select customer again it opens the <code>customerframe</code> but the problem is that the listeners don`t work anymore, I guess they somehow remain connected to the old frame or something.</p>
  
  <p>I have been trying to make it work for some hours now...</p>