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