File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create customised listener

 
sanjey asok
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create a customized listener in Java, I explain as follow

I have a class A which has a property "name" as String type ,when the value of "name" is changed some method should be called.

So I want a listener to listen and catch the value change,How It can be done?
 
Geoff Jefferson
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post your class so we can see?

 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like a PropertyChangeListener would do. You can even use PropertyChangeSupport to do all the hard work for you.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic