title: Java Parent and Child JFrame
body: <p>I'm new to <code>javax.swing.*</code> packages and only familiar to c#.net.
  I have two JFrames namely <code>frmLogin</code> and <code>frmMain</code> respectively.
  All I want to do is a simple code something like this:</p>
  
  <p>+-----  C# version ---------</p>
  
  <pre><code>this.hide();
  new frmMain().ShowDialog();
  this.show();
  
  tbPsswrd.Text = String.empty;
  </code></pre>
  
  <p>+----  JAVA version -------</p>
  
  <pre><code>this.setVisible(false);
  new frmMain().setVisible(true);
  this.setVisible(true);
  
  tbPsswrd.Text = "";
  </code></pre>
  
  <p>+---------------------------</p>
  
  <p>In Java JFrame, only <code>show()</code> and <code>setVisible(boolean isVisible)</code> is available, 
  hence even though I'm not finished with <code>frmMain()</code>, it will continue to do the
  rest of the code next to it (which is to show the parent form and empty the password
  box).</p>
  
  <p>In summary, I want an equivalent functionality of method <code>.showDialog();</code> not just <code>.show();</code>
  so that it wont continue to the next codes unless I closed the child form.</p>
  
  <p>Thanks in advance! Ü</p>