This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 19654

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
I agree. Here's the link:
subject: create customised listener
Similar Threads
in spring framework,Is it mandatory to have a “dispatch servlet name –servlet “ file?
using field value
POST and Servlet
How to create user defined and customized call back method in core java?
Load the beanrefContext.xml in web Application