Java Reference
In-Depth Information
Figure 6-5. Form layout example
StringItem
StringItem represents a simple text label. For example, consider the following code:
Form form = new Form("Form Title");
StringItem stringItem = new StringItem("Label: ", "Value");
form.append(stringItem);
Caution You need to be careful when using a “:” in your StringItem labels. Some MIDP implementation
may append its own “:” for a label, resulting in double colons. The MIDP implementation of the WTK emulator
does not append colons automatically for StringItem labels.
The form produced by this code (plus a Back command) is shown in Figure 6-6.
Figure 6-6. A form with a single StringItem and a Back command
 
Search WWH ::




Custom Search