Categories

Custom Java Events

To create custom Java events we need basicly three classes:

The event class which will be fired
An interface which indicating responsibility of event listeners of this event
The class which fires the Java events

When these classes are prepared, other classes can subscribe to events  by providing their event listener.

An event class must extend java.util.EventObject class. Below you [...]