GridBagLayout can be daunting at first, but it's very flexible, and is worth getting to know.
JButton button = ...;
JLabel[] labels = new JLabel[] {
new JLabel("Label 1"),
...
};
JTextField[] fields = new JTextField[] {
new JTextField(15),
...
};
JPanel[] rows = new JPanel[] {
new JPanel(),
...
}
Container container = getContentPane();
container.setLayout(new GridBagLayout());
GridBagConstraints cons = new GridBagConstraints();
// Layout each row's contents(label + text field)
cons.fill = GridBagConstraints.BOTH;
cons.insets = new Insets(2, 8, 2, 8);
for (int i = 0; i < rows.length; ++i) {
rows[i].setLayout(new GridBagLayout());
// Labels get 30% of the row's extra horizontal space.
cons.weightx = 0.3;
rows[i].add(labels[i], cons);
// Text fields gets 70% of the row's extra horizontal space.
cons.weightx = 0.7;
rows[i].add(fields[i], cons);
// Add each row to the panel, top to bottom
// Each row takes up all of the horizontal space.
cons.gridx = 0;
cons.weightx = 1;
container.add(rows[i], cons);
cons.gridx = GridBagConstraints.RELATIVE;
}
// Add the button at the bottom.
// Dont let button get any extra horizontal space (so it won't stretch)
cons.gridx = 0;
cons.weightx = 0;
cons.fill = GridBagConstraints.NONE;
container.add(button, cons);