Label
A Label is a displayed String object.
Corresponding source code:
import java.applet.*;
import java.awt.*;
public class LabelWidget extends Applet {
public void init()
{
add(new Label("a label"));
// right justify
add(new Label("right justified label",Label.RIGHT));
}
}
Related exercise(s):
|