A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
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.
I agree. Here's the link:
subject: How to search a specific character in a String
Dynamic Data Types in Eclipse
Assert stmt in Eclipse
JUnit and Cactus using strutstestCase
Accessing servlet-config parameter through EL
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014