What is event? — Emereoworld.com

What is event?

Communication from Swing objects come in the form of sending events.  An event is a Java object delivered to its receiver by invoking a Java method.  The conventions used to perform this event comprise the entire Java event mechanism to determine when, how, and to whom events should be delivered.  Events are sent from a single source object and delivered to one or more listeners.  Listeners will implement the prescribed event-handling methods required to enable them to receive a specific type of event and will register itself with the source of the event before receiving any events.

Events are an instance of the java.util.EventObject subclass.  The parent class is used to identify event objects and contains a reference to the event source.   ActionEvent is related to decisive actions users take on components.  Each ActionEvent contains the name of the action (action command) to be performed.  MouseEvents are related to using the mouse within the component area and contain information such as x and y coordinates and the state of mouse buttons.

for more information about java swing and to be well prepared for your SCJA exam –  sign up for the SCJA exam preparation course:

**For Instant Access, follow these simple steps

  1. Go here
  2. After payment is confirmed you can download your enrolment procedure
  3. Choose your username and password and create your account
  4. Confirm your registration, log in and you’re ready to start your exam preparation course **

Previous post:

Next post: