We are migrating from java 1.4 to 1.6 with frontend being Java Swing. Now the focus is giving us a very hard time.
The main issue is when we tab out of a textfield, focuslost method is called in which we validate the content of the textfield. If the content is correct we return true and the focus moves ahead to the next textfield. If the content is invalid we show a popup validation message in JDialog, call the same textfield.requestFocus() and return false. Now on calling this textfield.requestFocus() again before returning false the focuslost is again triggered on the textfield and the validation message is displayed again in the popup. This happens only twice, everywhere we show a validation message in a popup and request the focus back on the field.
Please help us.