title: Position JLabel in JPanel with GridBagLayout
body: <p>The idea is to make a <code>JLabel</code> inside a <code>JPanel</code> inside a <code>JFrame</code>. I want to position the label in the bottom left corner and I want to do it with the <code>GridBagLayout</code>. I've played around with the <code>GridBagConstraints</code> fields but nothing I've done seems to work. The only thing that kind of worked is altering the padding for the <code>JLayer</code>, but half of the times it didn't work as planned. </p>
  
  <p>Here's the code:</p>
  
  <pre><code>class Panelz extends JFrame{
  JPanel panel = new JPanel();
  JLabel label = new JLabel();
  
  public static void main(String[] args){
      Panelz p = new Panelz();
      p.pack();
      p.setVisible(true);
      p.setDefaultCloseOperation(EXIT_ON_CLOSE);
  }
  
  public Panelz(){
      Dimension scr = new Dimension(500,500);
      this.setPreferredSize(scr);
      Container cont = this.getContentPane();
      cont.setLayout(new GridBagLayout());
      GridBagConstraints c = new GridBagConstraints();
  
      label.setText("Potato");
      //make panel
      panel.setBackground(Color.red);
      panel.setLayout(new GridBagLayout());
  
      c.fill=GridBagConstraints.BOTH;
      c.gridx=0;
      c.gridy=0;
      c.weighty=100f;
  
      panel.add(label,c);
  
      c.weightx=0.2f;
      c.weighty=0.2f;
      cont.add(panel, c);
  }
  }
  </code></pre>
  
  <p>The output always is the label text in the center of the panel.</p>