title: java swing, necessary calls in main method
body: <p>When studying for an exam I stumbled upon some lines in java graphics that aren't really clear to me. So i started to glance and check some other programs and they were without those lines.</p>
  
  <p>example:</p>
  
  <pre><code>public static void main(String[] args){
    SwingUtilities.invokeLater(new Runnable(){//unknown
    public void run(){                        //lines
    JPanel panel = new DrawingPanel();
    ...
  }
  </code></pre>
  
  <p>now i know that Runnable and run have to deal with threads, but i don't know why and how do these two lines work</p>