title: Best practice to start a swing application
body: <p>What is the best practice way to start a java swing application? Maybe there is  another way to do it.</p>
  
  <p>I want to know if i have to use the SwingUtilities class to start the application (secound possibility) or not (first possibility).</p>
  
  <pre><code>public class MyFrame extends JFrame {
  
  public void createAndShowGUI() {
      this.setSize(300, 300);
      this.setDefaultCloseOperation(EXIT_ON_CLOSE);
      // add components and stuff
      this.setVisible(true);
  }
  
  public static void main(String[] args) {
  
      // First possibility
      MyFrame mf = new MyFrame();
      mf.createAndShowGUI();
  
      // Secound possibility
      SwingUtilities.invokeLater(new Runnable() {
  
          @Override
          public void run() {
              MyFrame mf = new MyFrame();
              mf.createAndShowGUI();
          }
      });
  }
  </code></pre>
  
  <p>}</p>