Results 1 to 3 of 3

Thread: Entering Numeric data

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 1999
    Posts
    165

    Question

    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?

  2. #2
    Hyperactive Member CyberSurfer's Avatar
    Join Date
    Aug 2000
    Location
    Old London Town
    Posts
    425
    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!!!

  3. #3
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    int myInt = Integer.parseInt(myString);
    "People who think they know everything are a great annoyance to those of us who do."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width