Results 1 to 2 of 2
  1. #1
    decgaid06 is offline Member
    Join Date
    Mar 2011
    Posts
    21
    Rep Power
    0

    Default to start with textfield to array....pls

    i would like to use my 30 double numbers input in my text field to form an array

    but i dont know how to start......im using GUI Frame at netbeans....

    tnx....

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    You have the numbers in one JTextField? If so, what separates them? Commas? Spaces? This is not really a GUI question but a String parsing question since you should know how to easily extract the String from the JTextField, and so then your task becomes how to separate this String of 30 numbers into an array of 30 numbers. Usually the easiest way to do this is to call split(...) giving you a an array of Strings which you will then need to convert to doubles via Double.parseDouble.

Similar Threads

  1. Replies: 1
    Last Post: 01-18-2011, 06:27 PM
  2. Won't set to textfield
    By Steffers in forum New To Java
    Replies: 7
    Last Post: 11-04-2010, 02:32 PM
  3. Replies: 5
    Last Post: 03-20-2009, 10:04 PM
  4. TextField Example
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-25-2008, 02:21 PM
  5. JSP - getting value from a textfield
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-01-2007, 08:58 PM

Tags for this Thread

Posting Permissions

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