Basic HTML version of Foils prepared March 26 1999

Foil 10 GridLayout

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


1 A GridLayout divides the applet area into rows and columns of equal size.
2 To get a GridLayout, use the setLayout method in the applet, and make a GridLayout with the number of rows and columns: setLayout ( new GridLayout ( 3, 2 ) );
3 Use the add method to add components in the same order as before, but now
4 label
5 label
6 button
7 textfield
8 textfield
9 they will line up, and they will be made the same size.

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