Unit2 Event Handling 1
Unit2 Event Handling 1
Events in Java
Events in Java represent the change in the state of any object. Events
occur when the user interacts with the interface. Clicking a button,
moving the mouse, typing a character, selecting an item from a list,
and scrolling the page are all examples of behaviors that cause an
event to occur.
Event handling in Java is the process of controlling an event and
taking appropriate action if one occurs.
Types of Events in Java:
•Foreground Events: These events necessitate the user's
direct participation. They are produced as a result of a user
interacting with graphical components in a Graphical User
Interface.