PDA

Click to See Complete Forum and Search --> : Entering Numeric data


J Staniforth
Oct 2nd, 2000, 09:24 AM
Hi,
as far as I can see there is only the text box control to enter data onto a form. Trouble is that all I can get from this through code is a string version of the values. In order to work with it I need to convert to integer.
But how do I do this - in J++ it insists on putting commas for thousands!
Surely there is a simpler way?

CyberSurfer
Oct 2nd, 2000, 02:46 PM
Having only just started Java, I may be completely off track, but would

int integer = yourstring?

I know I've used it a lot in VB!!!

noone
Oct 2nd, 2000, 08:05 PM
int myInt = Integer.parseInt(myString);