This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes need help with adding listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "need help with adding listener" Watch "need help with adding listener" New topic

need help with adding listener

Candy Bortniker
Ranch Hand

Joined: Mar 17, 2003
Posts: 123
I am trying to add a propertyChangeListener. I got some help from the "How to" section of the API but the statement textfield.addPropertyChangeListener(this) is giving me a compile error and I don't know what need to be fixed.
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399

In order to do "textfield.addPropertyChangeListener(this);" the object you are registering ("this") must be a PropertyChangeListener. Since you've already implemented the public void propertyChange(PropertyChangeEvent evt) method you just have to make sure that your class (BlueSliderBeanFrame) is a PropertyChangeListener.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: need help with adding listener
jQuery in Action, 3rd edition