This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "need help with adding listener" Watch "need help with adding listener" New topic
Author

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
Try:

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: http://aspose.com/file-tools
 
subject: need help with adding listener
 
Similar Threads
using a bean to put slider on panel
slider in bean
using a bean
textfield value for JSlider
Mac help - I thought Java was platform independent?