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


1 The simplest component is a Label object.
2 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.
3 To add a label to an applet: add ( new Label ( "This is a label!" ) ;
4 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.

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