title: While the form is running, other commands are executed
body: <p>i write a method to create a form, then some other commands after that in main.(java)</p>
  
  <pre><code>package pak2;
  import javax.swing.*;
  
  public class form6 {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
  
            JFrame jframe = new JFrame();
  
            JButton jButton = new JButton("JButton");
  
            jframe.getContentPane().add(jButton);
  
            jframe.pack();
            jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            jframe.setVisible(true);
  
              System.out.println("test***ok");//testtttttttttttttt
  
  
      }
  }
  </code></pre>
  
  <p>i want to execute "System.out.println("test***ok");"  after that the form are closed.
   but when i run program, before i enter information in form, Other commands that are executed!
  While the form is running, other commands are executed! how can i set it.</p>