Question

In the javadoc it says that EventListener is

"A tagging interface that all event listener interfaces must extend."

Why is that? What's the significance of making a custom listener implement EventListner? Is there any special handling for EventListner somewhere?

Was it helpful?

Solution

It’s only important if you want to use an EventListenerList or an EventListenerProxy. I like to use it on my own event listener interfaces as well, though. It makes the purpose of the interface much clearer.

OTHER TIPS

Probably used by javabeans introspection.

For instance Netbeans beaninfo editor does not recognise the event if extends EventListener is missing from the Listener.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top