Basic HTML version of Foils prepared Sept 21 1998

Foil 50 GridLayouts

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

GridLayouts for Foil 50
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));
Additional arguments hgap and vgap specify the number of pixels inbetween the columns and rows:
  • setLayout(new GridLayout (2, 3, 10, 15 ));
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.



© 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