Swing lost focus event problem in browser
I use a lost focus event for data validation for a JTextField in my applet -- a message box pops up on lost focus if invalid data input is detected. While this works fine from IDE (in my case, Visual Cafe), if I try it from the browser however, the same message box pops up many times each time the lost focus happens with invalid input. I already checked and handled the tempery event from the lost focus routine and it works just as expected from the applet viewer. Does anyone has a solution to this problem? Or has someone heard of this before?
Thanks.
Re: Swing lost focus event problem in browser
Re: Swing lost focus event problem in browser
Thanks Poochi,
Yes, I did handled the temporary event -- test to see if it is temporary and do nothing if it is. I don't have problem with that. My problem is that the lost focus event get called more times when I run the applet in web server/browser environment, while it works just fine from applet viewer or other IDEs. Every time I test it from the brower, the same message box I created pops up 2 or 4 times when focus lost event got fired with an invalid input in the testing JTextField.
Any ideas?
Thanks again.
Lifeng
Re: Swing lost focus event problem in browser
Can you post a simple and compilable code ?