JPanel south = new JPanel(new AxisLayout(AxisLayout.HORIZONTAL));
south.add(button1);
south.add(button2);
frame.getContentPane().add(south, BorderLayout.SOUTH);
Obs: Sorry dont remember exactly Swing layout manangers, but you will find the AxisLayout to solve this