Basic HTML version of Foils prepared Sept 21 1998

Foil 30 Basic AWT Components

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


For each basic component, one can create one or more instances of the component type and then use one of the "add" methods to place it into a Container such as an applet window.
For now, we assume that components are added to the window in order from left to right and top to bottom as they fit. (This is actually the default FlowLayout Manager).
Also for each component, there will be other methods:
  • some affect the properties or appearance of the component, such as setBackground.
  • others may dynamically obtain or change information about the component, such as getText for TextFields, which may return whatever String the user has typed into the TextField.



© 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