Click to See Complete Forum and Search --> : how to control input


anny80
07-07-2005, 12:59 PM
good evening
i have a problem.
i want to check the input introduced by an user in a jTextField
i want to control , for example,that a NAME has only characters(a,b......A,B.....) and not number.
can you help me?
i'm sorry for my english,but i hope you understand me e help me!
thank you

buntine
07-07-2005, 06:02 PM
Your best bet would be to use Regular Expressions to validate the users input. the subject can be quite complex, but for basic validation, it is a priceless tool.

See this for a nice tutorial to get you started: http://www.javaregex.com/tutorial.html

If your still having some problems with it, come back and we can fix it up for you. ;)

Regards.