ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Using the Decorator Pattern
Subject:   Great article, what about listeners
Date:   2004-12-13 08:35:02
From:   asra7
Hello,
This article solved my age old problem of decorators in Java. I have one question, how can we add a mouse listener to the decorator so that events to the component are passed to the decorator and the event object's get source method returns the decorator object and not the component within it.