This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFormattedTextField still verifies upon Cancel

 
laila NiHai
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using JFormattedTextField and override the verify method to notify the user of invalid input. This all works great; however, if an invalid input is entered and the user decides to exit/cancel without making to correction, the verifier still kicks in. I am not sure how listening to the textField will work, b/c when the button is clicked then the source is the button...but the textfield still has focus...

Please give me some pointers on how to fix this.

Thanks in advance for your time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic