Displaying Dialog in shouldYieldFocus method of InputVerifier

I have implemented InputVerifier in the JTextField to verify whether the text passes my criteria.

Documentation says that the InputVerifier method shouldYieldFocus can have side effects ?so I am displaying a Dialog box informing the user that the text is invalid.

But that dialog causes to another call to shouldYieldFocus ?and finally I get stack overflow exception. How can I inform the user that the text is invalid without causing recursive call to shouldYieldFocus methd?

[496 byte] By [rejki@optusa] at [2007-11-27 3:01:41]
# 1
http://forum.java.sun.com/thread.jspa?forumID=57&threadID=776107&start=6The trick is to remove the InputVerifier before displaying the dialog.
camickra at 2007-7-12 3:43:52 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thanks a lot for that - believe it or not I was just about to try it out - but this reassures me that this is the correct way.Once again thanks.Janusz
rejki@optusa at 2007-7-12 3:43:52 > top of Java-index,Desktop,Core GUI APIs...