Basic HTML version of Foils prepared Sept 21 1998

Foil 48 Description and Example of BorderLayout

From Java Tutorial 98- 3: Graphics and the Abstract Windowing Toolkit NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken

BorderLayouts for Foil 48
BorderLayout has five cells called North South East West Center and components are assigned to these cells with the add method. Unlike other add methods, here the order is not important:
  • add(new TextField("Title",50), BorderLayout.NORTH);
  • add(new TextField("Usually_status_message",50), BorderLayout.SOUTH);
Remember this is default for a Frame Container
The constructor "new BorderLayout()" can have no arguments or "new BorderLayout(hgap, vgap)" can specify numbers of pixels inbetween components.
North
South
W
e
s
t
E
e
s
t



© 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 Sat Nov 28 1998