title: GridBagLayout in Java Column Issue
body: <p>I'm trying to use the GridBagLayout layout manager to achieve this:</p>
  
  <p><img src="https://i.stack.imgur.com/qjunT.png" alt="enter image description here"></p>
  
  <p>However, what I am currently getting is this:</p>
  
  <p><img src="https://i.stack.imgur.com/KX49a.png" alt="enter image description here"></p>
  
  <p>The problem being that the orange and brown/gray panels are supposed to occupy the second column, but seem to only want to occupy the third when it comes to running the code.</p>
  
  <p>The code that I'm using for the layout:</p>
  
  <pre><code> Container contentPane = form.getContentPane();
      contentPane.setLayout(new GridBagLayout());
      GridBagConstraints c = new GridBagConstraints();
  
      JPanel pnlGame = new JPanel();
      pnlGame.setBackground(Color.green); //temp
      c.gridx = 0;
      c.gridy = 0;
      c.gridwidth = 2;
      c.gridheight = 2;
      c.fill = GridBagConstraints.BOTH;
      c.weightx = 0.85;
      c.weighty = 0.65;
      contentPane.add(pnlGame, c);
  
      JPanel pnlBuy = new JPanel();
      c.gridx = 2;
      pnlBuy.setBackground(Color.blue); //temp
      c.gridy = 0;
      c.gridwidth = 1;
      c.gridheight = 1;
      c.fill = GridBagConstraints.BOTH;
      c.weightx = 0.15;
      c.weighty = 0.46;
      contentPane.add(pnlBuy, c);
  
      JPanel pnlUpgrade = new JPanel();
      pnlUpgrade.setBackground(Color.yellow); //temp
      c.gridx = 2;
      c.gridy = 1;
      c.gridwidth = 1;
      c.gridheight = 1;
      c.fill = GridBagConstraints.BOTH;
      c.weightx = 0.15;
      c.weighty = 0.19;
      contentPane.add(pnlUpgrade, c);
  
      JPanel pnlStats = new JPanel();
      pnlStats.setBackground(Color.red); //temp
      c.gridx = 0;
      c.gridy = 2;
      c.gridwidth = 1;
      c.gridheight = 2;
      c.fill = GridBagConstraints.BOTH;
      c.weightx = 0.61;
      c.weighty = 0.35;
      contentPane.add(pnlStats, c);
  
      JPanel pnlSpeed = new JPanel();
      pnlSpeed.setBackground(Color.orange); //temp
      c.gridx = 1;
      c.gridy = 2;
      c.gridwidth = 2;
      c.gridheight = 1;
      c.fill = GridBagConstraints.BOTH;
      c.weightx = 0.38;
      c.weighty = 0.04;
      contentPane.add(pnlSpeed, c);
  
      JPanel pnlRounds = new JPanel();
      pnlRounds.setBackground(Color.gray); //temp
      c.gridx = 2;
      c.gridy = 3;
      c.gridwidth = 2;
      c.gridheight = 1;
      c.fill = GridBagConstraints.BOTH;
      c.weightx = 0.38;
      c.weighty = 0.31;
      contentPane.add(pnlRounds, c);
  </code></pre>
  
  <p>So, what am I doing wrong? Sorry if my English is a bit shitty, and/or the mistake I'm making is blindingly obvious... it's 20 to 5 in the morning, and I've had a long day. Should probably be hitting the hay, fairly shortly.</p>
  
  <p>UPDATE:</p>
  
  <p>It appears that if I change the gridwidth of the brown/gray panel, everything seems to align properly, but I end up with a nasty gap in my layout. Here:</p>
  
  <p>i.imgur.com/6JUx2.png</p>
  
  <p>And the code for the panel (including the amendment suggested by Kevin S):</p>
  
  <pre><code>JPanel pnlRounds = new JPanel();
  pnlRounds.setBackground(Color.gray); //temp
  c.gridx = 1;
  c.gridy = 3;
  c.gridwidth = 1;
  c.gridheight = 1;
  c.fill = GridBagConstraints.BOTH;
  c.weightx = 0.38;
  c.weighty = 0.31;
  contentPane.add(pnlRounds, c);
  </code></pre>
  
  <p>So, is there anything that I'm doing wrong, or is this just some weird behaviour of the GridBagLayout that I'm going to have to live with?</p>
  
  <p>Unfortunately, thanks to me editing, I've lost all the embeds that Bala R kindly put in there. So, we're back to the links for images, I'm afraid. And now it seems that I can't post more than two hyperlinks, so the link has been killed in the last one, you need to copy and paste it in.</p>
  
  <p>Thanks, Sam</p>