> 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.