Results 1 to 2 of 2
  1. #1
    Josep_16's Avatar
    Josep_16 is offline Member
    Join Date
    Mar 2011
    Posts
    40
    Rep Power
    0

    Default Get a text from a TextField as a double number.

    Hi there. What's the way to take a number from a TextField as a double number, not as a String. I know you can get it as a String with "textfieldName.getText()", but it does not work for me because I need to take the text in field as a number, of course assuming that what I write on the TextField will be only numbers. Maybe is there any kind of TextField but for numbers, or any way to convert a String with numbers into a double. Thanks!

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,573
    Rep Power
    23

    Default

    way to convert a String with numbers into a double.
    Look at the Double class for methods to convert String to double.

Similar Threads

  1. need help with Number Pyramid with Double Digits
    By SmellyFoot in forum New To Java
    Replies: 5
    Last Post: 03-29-2011, 12:04 PM
  2. Replies: 3
    Last Post: 11-16-2010, 08:43 AM
  3. Replies: 2
    Last Post: 06-14-2010, 10:18 AM
  4. accessing the text of textfield of one class in another
    By vasavi.singh in forum Advanced Java
    Replies: 3
    Last Post: 04-05-2009, 02:54 PM
  5. Help with convert a double type number
    By trill in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 08:48 AM

Posting Permissions

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