setLayout(new GridBagLayout( ));
constraints.weightx = 1.0;
constraints.weighty = 1.0;
constraints.fill = GridBagConstraints.BOTH;
int x, y; // for clarity
constraints.gridheight = 2; // span two rows
addGB(new JButton("one"), x = 0, y = 0);
constraints.gridheight = 1; // set it back
addGB(new JButton("two"), x = 1, y = 0);
addGB(new JButton("three"), x = 2, y = 0);
constraints.gridwidth = 2; // span two columns
addGB(new JButton("four"), x = 1, y = 1);
constraints.gridwidth = 1; // set it back