File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes create customised listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "create customised listener" Watch "create customised listener" New topic

create customised listener

sanjey asok
Ranch Hand

Joined: Jul 11, 2009
Posts: 39
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

Joined: Apr 09, 2009
Posts: 102
Can you post your class so we can see?

Rob Spoor

Joined: Oct 27, 2005
Posts: 19684

Seems like a PropertyChangeListener would do. You can even use PropertyChangeSupport to do all the hard work for you.

How To Ask Questions How To Answer Questions
subject: create customised listener