File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 agree. Here's the link:
subject: need help with adding listener
It's not a secret anymore!