Hi, Using swing i am creating a text field which will take email address from user.I have one question ,how to check that user has entered '@'(and also '.').Does anybody know this? I need urgent help.
Thanks Anagha ------------------
deekasha gunwant
Ranch Hand
Joined: May 06, 2000
Posts: 396
posted
0
Hi Anagha, u can use int i = txtfld.getText().indexOf('@'); if i==-1 then it means '@' is not there in the textfield.