• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

need help with adding listener

 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic