Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

During creation, getting original value from javabean

 
Eric Braun
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JTextField and I added a PropertyChangeListener to listen for changes to my Java Bean. This is working great.
However, I need to set the original value in the text field when the form is loaded. I cannot use the PropertyChangeListener, because it hasn't changed. I am making a customized JTextField that will have my listner and all of my field objects will be extending this one. So, I cannot hardcode my getter.
Is there a way to fire my PropertyChangeListener on intialization? How do I go about getting the value out of my JavaBean? Do I need to do reflection?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!