Showing posts with label MouseEvent Class. Show all posts
Showing posts with label MouseEvent Class. Show all posts

Monday, 24 February 2014

EVENT CLASSES:MouseEvent Class

 KeyEvent and MouseEvent are subclasses of abstract InputEvent class..................

The MouseEvent Class

                    KeyEvent and MouseEvent are subclasses of abstract InputEvent class. Both these events are generated by objects of type Component class and its subclasses.The MouseEvent is generated when the user presses the mouse or moves the mouse.


The MouseEvent class defines the following integer constants:


  • MOUSE_CLICKED    :     The user clicked the mouse.
  • MOUSE_DRAGGED  :     The user dragged the mouse.
  • MOUSE_ENTERED   :     The mouse entered a component.
  • MOUSE_EXITED        :     The mouse exited from a component.
  • MOUSE_MOVED        :     The mouse moved.
  • MOUSE_PRESSED   :     The mouse was pressed.
  • MOUSE_RELEASED:    The mouse was released.
  • MOUSE_WHEEL        :    The mouse wheel was moved.


 MouseEvent constructors:


MouseEvent(Componentsrc, int type, long when, int modifiers,int x, int y, int clicks, boolean triggersPopup)