title: Java Swing window takes 15 seconds to show
body: <p>I started writing a simple Hello world app with <code>JFrame</code>, and I noticed that the first window that I create (or the first reference to Swing libraries) takes 15 seconds to show. I also tested it with the compiled application launched from console to see if there is a difference, and there is none.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>public static void main(String args[]) {
  
      /* Create and display the form */
      SwingUtilities.invokeLater(new Runnable() {
          public void run() {
              long start = System.currentTimeMillis();
              new Test().setVisible(true);
              System.out.println("FORM 1: " + (System.currentTimeMillis() - start));
  
              start = System.currentTimeMillis();
              new Test2().setVisible(true);
              System.out.println("FORM 2: " + (System.currentTimeMillis() - start));
          }
      });
  }
  </code></pre>
  
  <p>And here's output:</p>
  
  <pre><code>FORM 1: 15362
  FORM 2: 203
  </code></pre>
  
  <p>I've read about disabling D3D for Java2D but it's no use for me as I work on linux (openSUSE). I also tried switching from Oracle's JDK 1.8 to openJDK 1.8 but it still doesn't make any difference.</p>
  
  <p><p>What can I do to speed that thing up?</p>