title: Java program doesn't show swing elements until resized?
body: <p>Could anyone please explain why this may be happening?
   Image is here <a href="http://tinypic.com/r/2n39ep/6" rel="nofollow">Image</a> I couldn't upload because I'm a new user.</p>
  
  <pre><code>setTitle("jNote");
      pack();
      setVisible(true);
      setLayout(new BorderLayout());
      setDefaultCloseOperation(EXIT_ON_CLOSE);
      Image icon = Toolkit.getDefaultToolkit().getImage("jNote.png");
      setIconImage(icon);
  </code></pre>