Java Reference
In-Depth Information
Introducing the StringItem
The StringItem class provides a read-only control drawing a text value. StringItem
instances may bear labels and be drawn as buttons or hyperlinks (see Figure 5-5). How a
StringItem appears depends on three things: the label , contents , and appearance mode
flags. The appearance mode can be one of the values StringItem.PLAIN , StringItem.
HYPERLINK , or StringItem.BUTTON , yielding the results you would expect.
Figure 5-5. StringItem instances of different appearances
You can change the label or contents of a StringItem instance at any time via the
setLabel and setText methods. You can also change the font of a StringItem object
through a property that's available via the setFont and getFont methods.
 
Search WWH ::




Custom Search