|
Hi,
You can do the validation in swings same as Javascript using "Regular Expression". In java, you have two classes called "Pattern" and "Matcher". using which you can do this.
Example:-
String str=Regular Expression
String str2="Email Address to be validated"
Pattern p=Pattern.compile(str);
Matcher m=p.matcher(str2);
if(m.find()==true){}
else {}
Post Reply if u have doubts.
|