title: setPreferredSize does not work
body: <p>Code:</p>
  
  <pre><code>import java.awt.Dimension;
  
  import javax.swing.*;
  
  public class Game extends JFrame {
      private static final long serialVersionUID = -7919358146481096788L;
      JPanel a = new JPanel();
      public static void main(String[] args) {
          new Game();
      }
      private Game() {
          setTitle("Insert name of game here");
          setLocationRelativeTo(null);
          setLayout(null);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          a.setPreferredSize(new Dimension(600, 600));
          add(a);
          pack();
          setVisible(true);
      }
  }
  </code></pre>
  
  <p>So I set the preferred size of the <code>JPanel</code> to 600 by 600 and pack the frame, but the frame's size is still 0 by 0. </p>
  
  <p>Why is this and how do I fix it?</p>