String check

Hello,I have users input numbers in JTextField and then retrieve the string. I wanted to check if the string input is a number. How can I go about doing this?Any help is much appreciated.vyang
[220 byte] By [vyanga] at [2007-11-26 19:27:25]
# 1

> I have users input numbers in JTextField and then

> retrieve the string. I wanted to check if the string

> input is a number. How can I go about doing this?

You could try to parse it. But before you get to that Point I would suggest that rather than validating input, prevent the user from entering invalid data by either using a JFormattedTextField or a JSpinner, etc.

zadoka at 2007-7-9 21:53:47 > top of Java-index,Java Essentials,New To Java...
# 2
Thanks, I'll look into those vyang
vyanga at 2007-7-9 21:53:47 > top of Java-index,Java Essentials,New To Java...