views:

1300

answers:

2

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?

+3  A: 

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.

Bombe
Can't you just make your interface extend EventListener and get the best of both worlds?
Hank Gay
That’s exactly what I do so what is the other world you’re talking of? :)
Bombe
+2  A: 

Probably used by javabeans introspection.

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

asalamon74