title: Align JLabel to the left of the panel in a gridbaglayout
body: <p>I have a panel in which i have specified with a grid bag layout. I basically have 1 column and 4 rows. The labels are aligned to the center by default. How do i align them to the left?</p>
  
  <pre><code>  private void addLabel(String name, int gridx, int gridy, int anchor ){
              gbc.gridx=gridx;
              gbc.gridy=gridy;
              JLabel label=new JLabel(name);
              gbc.fill=GridBagConstraints.HORIZONTAL;
              gbag.setConstraints(label, gbc);
              panel1.add(label);
  </code></pre>
  
  <p>The caller lines are:</p>
  
  <pre><code>gbc=new GridBagConstraints();
          gbag=new GridBagLayout();
  panlel1.setLayout(gbag);
  addLabel("    Exemption type", 0, 0,anchor );
  </code></pre>