Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Keana Schmidt   on Oct 11 In Java Category.

  
Question Answered By: May Hansen   on Oct 11

U can add the focusLostListener method to the text field u want to validate.
This focus lost will be called when the focus has been lost from the
textfiled u want to validate. This can be like when u pressed tab from the
textfield or u press on some other component in the dialog or frame this
method will be called.
If u want to restrict the user  while typing, then u need to add a keyPressed
or keyReleased event. it will validate every time u press or release the
key.

u can find the method signature and arguments in the Java doc API
http://java.sun.com/j2se/1.3/docs/api/

Share: 

 
 
Didn't find what you were looking for? Find more on Input mask for JTextField Or get search suggestion and latest updates.


Tagged: