Basic HTML version of Foils prepared 13 October 97

Foil 48 Description and Example of BorderLayout

From Java Tutorial, July 1, 1996 CSC499(JSU) CPS406/606 -- Fall Semester 97. by Nancy J. McCracken,Geoffrey C. Fox

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.



© 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 Wed Apr 1 1998