Page 416 - CITS - Computer Software Application -TT
P. 416

COMPUTER SOFTWARE APPLICATION - CITS



              Control & Description

              AWTEvent
              It is the root event class for all AWT events. This class and its subclasses supercede the original java.awt.
              Event class.

              ActionEvent
              The ActionEvent is generated when button is clicked or the item of a list is double clicked.
              InputEvent
              The InputEvent class is root event class for all component-level input events.
              KeyEvent

              On entering the character the Key event is generated.
              MouseEvent
              This event indicates a mouse action occurred in a component.

           Introduction to event listener interfaces


           The Event listener represent the interfaces responsible to handle events. Java provides us various Event listener
           classes but we will discuss those which are more frequently used. Every method of an event listener method
           has a single argument as an object which is subclass of EventObject class. For example, mouse event listener
           methods will accept instance of MouseEvent, where MouseEvent derives from EventObject.
           Event Listener interface:-
           It is a marker interface which every listener interface has to extend.This class is defined in java.util package.
           Class declaration:-

           Following is the declaration for java.util.EventListener interface:
           public interface EventListener
           AWT Event Listener Interfaces:
           Following is the list of commonly used event listeners.
           Control & Description
           1  ActionListener

           This interface is used for receiving the action events.
           2  ComponentListener
           This interface is used for receiving the component events.
           3  ItemListener

           This interface is used for receiving the item events.
           4  KeyListener
           This interface is used for receiving the key events.
           5  MouseListener
           This interface is used for receiving the mouse events.

           6  TextListener
           This interface is used for receiving the text events.
           7  WindowListener
           This interface is used for receiving the window events.




                                                           403

 CITS : IT&ITES - Computer Software Application - Lesson 116 - 119  CITS : IT&ITES - Computer Software Application - Lesson 116 - 119
   411   412   413   414   415   416   417   418   419   420   421