title: How to align left or right inside GridBagLayout cell?
body: <p>I see that <code>GridBagLayout</code> positions it's children with center alignment within cells. How to align left or right?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Constructing code (I know I could reuse <code>c</code>)</p>
  
  <pre><code>    // button panel
      JPanel button_panel = new JPanel();
      button_panel.add(ok_button);
      button_panel.add(cancel_button);
  
      // placing controls to dialog
      GridBagConstraints c;
  
      GridBagLayout layout = new GridBagLayout();
      setLayout(layout);
  
      c = new GridBagConstraints();
      c.gridx = 0;
      c.gridy = 0;
  
      add(inputSource_label, c);
  
      c = new GridBagConstraints();
      c.gridx = 1;
      c.gridy = 0;
      add(inputSource_combo, c);
  
      c = new GridBagConstraints();
      c.gridx = 0;
      c.gridy = 1;
      add(output_label, c);
  
      c = new GridBagConstraints();
      c.gridx = 1;
      c.gridy = 1;
      add(output_combo, c);
  
      c = new GridBagConstraints();
      c.gridx = 0;
      c.gridy = 2;
      c.gridwidth = 2;
      add(button_panel, c);
  </code></pre>