• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why is InputVerifier allowing button to be pressed  RSS feed

michael byrd
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an InputVerifier on a text field that does not allow loss of focus and beeps if the value is not valid. I assumed that when a button is pressed the InputVerifier of the text field would be called if it has focus and block the button press if the entry is not valid. However, even though the inputverifier is being called as attempting to block loss of focus (I get the beep), the button still gains focus and its actionPerformed method is called.

How do I modify my code to prevent the button from getting focus and its actionPerformed being called?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!