title: Java multiple GUI windows creation
body: <p>I have made a simple GUI using a <code>GridLayout(5,3)</code> , it is action performed and it implements action listener as well. The are some calculation and algorithms that working according to what inputs or buttons the user provides. Everything works just fine up to this point.</p>
  
  <p>At some point in my code, the user gets a pop up massage that he is correctly logged in to the system using this common method <code>JOptionPane.showMessageDialog(....)</code>  . All i want is, after he press the OK button, is to create an additional form that pop ups, and looks similar to the one above i made with <code>GridLayout(5,3)</code> so that my user can store additional info about him.</p>
  
  <p>I really cant get it to work, and i have no idea how to start this. </p>
  
  <p>Any ideas are very welcomed! Cheers and thanks in advance  :)</p>
  
  <p>if add this:</p>
  
  <pre><code>setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container pane = getContentPane();
              GridLayout grid=new GridLayout(10,1);
              pane.setLayout(grid);
  </code></pre>
  
  <p>it only adds more lines to my gridlayout. And all above buttons and labels remains. How can i get rid of the previous labels and buttons?</p>