How does an event work?
An event is handled by two elements. The first is the event source. This is actually an object that is created when an event is triggered. There are several types of event sources that are present in Java. A JSON generation can be initialized when an event source is detected according to the right trigger event.
The second is the event listener. This is an object, which actually looks for a particular event and then processes the required actions after the event has been established. This means that even listeners are required for carrying out any activities after the detection of a trigger.
There are different events that require their particular listeners. A common event is ActionEvent. This is an event that is triggered ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access