title: How to use GridBagConstraints to create the layout?
body: <p>I want to layout my JPane like so:</p>
  
  <pre><code>-------
  |     |
  |     |
  |     |
  -------
  |     |
  -------
  </code></pre>
  
  <p>This way, the top section is bigger/taller than the bottom section (the top section consists of another JPanel and uses the Graphics object to display an image, while the bottom section also consists of another JPanel but uses the Graphics object to draw some lines and text).</p>
  
  <p>I've heard that the best way to do this was using the GridBagLayout and GridBagConstraints.</p>
  
  <p>I'm trying to figure out the appropriate properties for the GridBagConstraints, and I'm having some difficulties. This is what I have so far...</p>
  
  <p>For the top part, I have:</p>
  
  <pre><code>gridx = 0
  gridy = 0
  weighty = 1.0; // expand downwards, because the bottom should never expand in the Y direction
  fill = GridBagConstraints.BOTH
  </code></pre>
  
  <p>For the bottom part, I have:</p>
  
  <pre><code>gridx = 0
  gridy = 1
  fill = GridBagConstraints.HORIZONTAL
  anchor = GridBagConstraints.PAGE_END
  </code></pre>
  
  <p>Unfortunately, all the ends up happening is a large gray rectangle appears (I have a white background for the application) - no images load, no lines/text appear.</p>
  
  <p>What should I do? What should I adjust?</p>
  
  <p>I've read a few tutorials, but it just seems really confusing, I got it working in my first application, but now when I try to do this it just doesn't seem to work for me.</p>