Wednesday, May 30, 2012

Day 17,30 May 2012



Today we were taught about the Event handling in JAVA .We were taught about the concept of Keylistener and Mouselistener in java. Key events indicate when the user is typing at the keyboard. Specifically, key events are fired by the component with the keyboard focus when the user presses or releases keyboard keys.
Notifications are sent about two basic kinds of key events:
The typing of a Unicode character
The pressing or releasing of a key on the keyboard
The first kind of event is called a key-typed event. The second kind is either a key-pressed or key-released event.
Keylistener listens to an event related to key pressed & release events and user can apply an action that would happen if that key events happens.e.g copy ,cut, paste shortcuts.
Mouse events notify when the user uses the mouse (or similar input device) to interact with a component. Mouse events occur when the cursor enters or exits a component's onscreen area and when the user presses or releases one of the mouse buttons.
Mouselistner listens to an event such mousemotion, mouseclick etc and  user can apply an action that would happen if that mouse events happens.

0 comments:

Post a Comment

 
;