Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MID Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.microedition.lcdui
Class Item

    java.lang.Object
      |
      +--javax.microedition.lcdui.Item

Direct Known Subclasses:
  ChoiceGroup, DateField, Gauge, ImageItem, StringItem, TextField

public abstract class Item
extends Object

A superclass for components that can be added to a `Form` and `Alert`. All Item objects have a label field, which is a string that is attached to the item. The label is typically displayed near the component when it is displayed within a screen. This means that the implementation tries to keep the label on the same horizontal row with the item or directly above the item. If the screen is scrolling, the implementation tries to keep the label visible at the same time with the Item.

In some cases, when the user attempts to interact with an Item, the system will switch to a system-generated screen where the actual interaction takes places. If this occurs, the label will generally be carried along and displayed within this new screen in order to provide the user with some context for the operation. For this reason it is recommended that applications supply a label to all interactive Item objects. However, this is not required, and a null value for a label is legal and specifies the absence of a label.

Method Summary
`String` | `getLabel()` Gets the label of this Item object.
`void` | `setLabel(String label)` Sets the label of the Item.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### setLabel

    public void setLabel(String label)

  Sets the label of the Item. If label is null, specifies that this item has no label.
  Parameters:
    `label` - the label string

### getLabel

    public String getLabel()

  Gets the label of this Item object.
  Returns:
    the label string

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| MID Profile
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a comment or suggestion Version 0.95 of MID Profile Specification
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.