Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Event Listners VS Event Adapters  RSS feed

 
Muhammad Ahsan Jamshaid
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the major Differences B/W EventListners and EventAdpters... Reasons Where to USe listners and where to use Adapters...

--Jamshaid..
 
Vlado Zajac
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adapters are helper classes which can be used as base class when you don't wan't to implement all event listener's methods.

Without adapter one would need to add all unused listener methods to the implementing class. So, adapters only save some typing when no GUI designer is used and probably some (small) amount of memory and storage space.
[ September 06, 2006: Message edited by: Vlado Zajac ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beware that the Swing ...Adapter classes don't have anything to do with the Adapter design pattern. In fact they are more like the Null Object pattern.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!