The ItemListener Interface:
This interface declares the itemStateChanged ( ) method which is invoked when the state of an item modifies. It common form is display here:
Syntax : Void itemStateChanged (ItemEvent ie)
The KeyListener Interface:
This interface declares three methods. The KeyPressed ( ) and KeyReleased ( ) methods are invoked whenever a key is pressed and released correspondingly. A KeyTyped ( ) methods is invoked when a character has been entered.
For instance, if a user presses and releases the key, three events are produced in sequence, key pressed, typed and released. Two key events are generated in sequence key pressed and released if a user presses and releases the Home key.
The common forms of these methods are display here:
Syntax: void keyPressed (keyEvent ke)
Syntax: void keyReleased (keyEvent ke)
Syntax: void keyTyped (keyEvent ke)