import java.awt.*;
import javax.swing.*;

public class BorderPanel extends JPanel
{
	public BorderPanel()
	{
		// sets the layout to the BorderLayout style
		setLayout (new BorderLayout());

		// creates 5 new buttons with labels Button x
		JButton btn1 = new JButton ("Button 1");
		JButton btn2 = new JButton ("Button 2");
		JButton btn3 = new JButton ("Button 3");
		JButton btn4 = new JButton ("Button 4");
		JButton btn5 = new JButton ("Button 5");

		// adds the buttons to the layout with orientations center, N, S, E, W
		// buttons won't do anything until action listener is set up.
		add (btn1, BorderLayout.CENTER);
		add (btn2, BorderLayout.NORTH);
		add (btn3, BorderLayout.SOUTH);
		add (btn4, BorderLayout.EAST);
		add (btn5, BorderLayout.WEST);
	}
}