Basic HTML version of Foils prepared March 26 1999

Foil 3 Labels

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


The simplest component is a Label object.
Adding a label to a GUI is like drawing a string - except that you don't have to say where things are placed in terms of pixels.
To add a label to an applet: add ( new Label ( "This is a label!" ) ;
The label will be placed in the applet area in the next available space.
  • The default arrangement of components is that components are placed starting from the top across the row to the right, and then filling the next row, and so on.



© 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