Showing posts with label KeyEvent Methods. Show all posts
Showing posts with label KeyEvent Methods. Show all posts

Saturday, 22 February 2014

EVENT CLASSES:The KeyEvent Class

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


The KeyEvent class


                 A KeyEvent is gnerated when the keyboard input occurs.This low-level event is generated by a component object (such as a text field) when a key is pressed, released, or typed. The event is passed to every KeyListener or KeyAdapter object which registered to receive such events using the component's addKeyListener method.

Integer constants:


CHAR_UNDEFINED:
KEY_PRESSED and KEY_RELEASED events which do not map to a  valid Unicode character use this for the keyChar value.

KEY_FIRST:
               The first number in the range of ids used for key events.
KEY_LAST:
             The last number in the range of ids used for key events.

KEY_PRESSED:
          The "key pressed" event.