By kaushik_sathupadi
via javaswing.net
Submitted: Jul 04 2008 / 01:13
Suppose you have a text field in your form that accepts an email address. Suppose you need to code such that if the email address typed by the user is not valid, then you shouldn’t let the focus out of this text field. Where would you put such a code? In the focus lost of the email-text-field? In the focus gained for all other text-fields? I don’t know what’s the best way to do this in JavaScript but there’s a super-elegant way in Swing!
Add your comment