A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
How to search a specific character in a String
Joined: Feb 06, 2001
Feb 06, 2001 22:17:00
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.
Joined: May 06, 2000
Feb 07, 2001 01:01:00
u can use
int i = txtfld.getText().indexOf('@');
if i==-1 then it means '@' is not there in the textfield.
It is sorta covered in the
JavaRanch Style Guide
subject: How to search a specific character in a String
Dynamic Data Types in Eclipse
JUnit and Cactus using strutstestCase
Accessing servlet-config parameter through EL
Assert stmt in Eclipse
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013