eugene007
asked on
Adapter vs Listener
what is the difference between an adapter and a listener. I have been using ActionListener and ItemListener often. I also came across WindowAdapter but I dont use it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://java.sun.com/docs/books/tutorial/uiswing/events/generalrules.html#eventAdapters
ASKER
So it means that if a class implements a Listener, it must also implement all the methods in the Listener. In the case of an adapter, you can choose which method you wish to implement.?
Thas right, because the adapter has provided (empty) implementations for you.
But You won't be able to implement any Adapter, it's a class, and that's what it makes less usable.