Basic HTML version of Foils prepared March 26 1999

Foil 11 BorderLayout

From Java Academy:Graphical User Interface NPAC Java Academy February--April 99 -- March 1999. by Nancy McCracken


1 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.
2 To get a BorderLayout, use the setLayout method: setLayout ( new BorderLayout ( ) );
3 To add components, also say which area they should go in: add ( button1, BorderLayout.NORTH );
4 North
5 South
6 W
7 e
8 s
9 t
10 E
11 a
12 s
13 t
14 You don't have to fill all the areas.
15 Center

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Fri Mar 26 1999