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.
|