BorderLayout
The BorderLayout divides the applet area into 5 spaces, called North, South, East, West, and Center. It tries to make the edges long and skinny, and to leave the Center area as big as possible.
To get a BorderLayout, use the setLayout method: setLayout ( new BorderLayout ( ) );
To add components, also say which area they should go in: add ( button1, BorderLayout.NORTH );
You don’t have to fill all the areas.