Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

During creation, getting original value from javabean  RSS feed

 
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!