setLayout(new GridBagLayout( ));
constraints.fill = GridBagConstraints.BOTH;
constraints.weighty = 1.0;
int x, y; // for clarity
constraints.weightx = 0.1;
addGB(new JButton("one"), x = 0, y = 0);
constraints.weightx = 0.5;
addGB(new JButton("two"), ++x, y);
constraints.weightx = 1.0;
addGB(new JButton("three"), ++x, y);