Basic HTML version of Foils prepared 13 October 97

Foil 50 GridLayouts

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

GridLayouts for Foil 50
1 The first two arguments of the GridLayout constructor specify the number of rows of cells (i.e. number of cells in the y direction) and the number of columns of cells (in the x direction)
  • setLayout(new GridLayout (2, 3));
2 Additional arguments hgap and vgap specify the number of pixels inbetween the columns and rows:
  • setLayout(new GridLayout (2, 3, 10, 15 ));
3 The GridLayout Manager's strategy is to make each cell exactly the same size so that rows and columns line up in a regular grid.

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