One of the most commonly used of the Item subclasses is the TextField class. It provides a convenient way to format text as it is entered or displayed. To apply formatting to the text processed by TextField objects, you can use one of several TextField properties. Among these are the DECIMAL and ANY properties, which are reviewed in Table 10.2. Since a TextField object is a subclass of Item, you can store it in an array of the Item type. You can then handle the messages from the TextField object by using the itemChanged() method, which is provided by the ItemStateListener interface.
|TextField (String, String, int, int)||Constructs a new TextField. The first argument is of the string type and provides ...|