How do I get numeric values from JTextField??
I am trying to figure out what to use to get user input from a text field on an interface, if the values entered were doubles, and not text. I mean I know how to get text, because there is the getText() option, but I could not find any getDouble, and I am not completely confident in using parse.
I hate to ask for code, but if someone could give me an example of what use for this I would be set, and I NEED IT, because I have a lot more to finish here and my GUI has several fields which are to accept numbers with decimal fractions, and I need to take those numbers, and use them for calculations to return to the user.:eek:
Anyway, if there is no getDouble option available, then what is there PLEASE?? :confused::confused::confused::confused:
Re: How do I get numeric values from JTextField??
You're asking how to convert a String into a double. Check out the Double API for useful functions.
Re: How do I get numeric values from JTextField??
Thanks, I will go through the API and see if I can find what I need!! :-bd