Showing posts with label Event class. Show all posts
Showing posts with label Event class. Show all posts

Tuesday, 25 February 2014

EVENT CLASS:TextEvent class

Instances of this class describe text events.........

The TextEvent Class


           Instances of this class describe text events. These are generated by text fields and text areas when characters are entered by a user or program.TextEvent defines the integer constant TEXT_VALUE_CHANGED.

TextEvent Class: constructor

         
       TextEvent(Objectsrc, int type)

            Here,src is a reference to the object that generated this event. The type of the event is specified by type.

Friday, 21 February 2014

EVENT CLASSES:The ItemEvent Class

an item was selected or deselected....


ItemEvent class:

A semantic event which indicates that an item was selected or deselected.Defines the itemStateChanged() method when an item has been selected or deselected by the user. The event is passed to every ItemListener object which registered to receive such events using the component's addItemListener method.

The stateChange of any ItemEvent instance takes one of the following values:


  • DESELECTED:   The user deselected an item

           syntax:
             ItemEvent.DESELECTED


  • SELECTED: The user selected an item.

            syntax:
                 ItemEvent.SELECTED