February 2014
Beginner
1248 pages
62h 25m
English
A typical GUI consists of many components. GUI designers often provide text stating the purpose of each. Such text is known as a label and is created with a JLabel—a subclass of JComponent. A JLabel displays read-only text, an image, or both text and an image. Applications rarely change a label’s contents after creating it.
Look-and-Feel Observation 12.6
Text in a JLabel normally uses sentence-style capitalization.
The application of Figs. 12.6–12.7 demonstrates several JLabel features and presents the framework we use in most of our GUI examples. We did not highlight the code in this example, since most of it is new. ...
Read now
Unlock full access