Why is InputVerifier allowing button to be pressed
posted 10 years ago
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?