title: JPanel does not appear in window unless I resize the window
body: <p>I am new to GUI in java, and have been using <a href="http://www.youtube.com/watch?v=ZipG38DJJK8" rel="nofollow">this video</a> to learn. When I run the program, the window is blank until I resize it.</p>
  
  <pre><code>public class GUIProgram extends JFrame
     {    
     int screenWidth = 1000; //screenSize.width;
     int screenHeight = 800; //screenSize.height;
  
     public GUIProgram()
        {
        super("DATABASE");
  
        setSize(screenWidth, screenHeight);
        setVisible(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
  
  
        JPanel p = new JPanel();
        JPanel p2 = new JPanel();
        JPanel p3 = new JPanel(new GridBagLayout());
  
        JButton b = new JButton("Button 1");
        JButton c = new JButton("Button 2");
  
        p.add(b);
        p.add(c);
  
            JCheckBox cb = new JCheckBox("Do you LOVE bacon?");
        JCheckBox cb2 = new JCheckBox("Do you LOVE cheese?");
  
        p2.add(cb);
        p2.add(cb2);
  
        JLabel label = new JLabel("This is a label");
        JTextArea tb = new JTextArea("this is a test area");
        JTextField textField = new JTextField("text field");
  
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.insets = new Insets(15,15,15,15);
  
            gbc.gridx = 0;
        gbc.gridy = 0;
        p3.add(label, gbc);
        gbc.gridx = 0;
        gbc.gridy = 1;
        p3.add(tb, gbc);
        gbc.gridx = 1;
        gbc.gridy = 2;
        p3.add(textField, gbc);
  
        add(p, BorderLayout.SOUTH);
        add(p3, BorderLayout.CENTER);
        add(p2, BorderLayout.NORTH);
  
        }
    }
  </code></pre>
  
  <p>Thanks in advance to anyone who can lend me some advice!
  Please let me know if there is some ambiguity in what I'm asking or how I explained myself.</p>