Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Question about arrays and jtexfields

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    15
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Question about arrays and jtexfields

    I have a group project to do and my group and I are trying to allow the user to enter information into two jtextfields. We then want the user to press a jbutton to add the information to the end of an array. Is it possible to add to an array by getting information for two separate jtextfields?


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Question about arrays and jtexfields

    Hello CheekySpoon,

    I think you should look into something like an ArrayList - ArrayList (Java Platform SE 6)

    Here is an example - http://www.javaprogrammingforums.com...arraylist.html
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. The Following User Says Thank You to JavaPF For This Useful Post:

    CheekySpoon (May 5th, 2011)

  4. #3
    Junior Member
    Join Date
    Feb 2010
    Posts
    15
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Re: Question about arrays and jtexfields

    Thanks for the suggestion. I'll see what they say about using an ArrayList instead.

Similar Threads

  1. Question on arrays.
    By SV25 in forum Java Theory & Questions
    Replies: 4
    Last Post: April 24th, 2011, 02:45 AM
  2. 2d arrays help
    By gonfreecks in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 27th, 2010, 05:27 PM
  3. arrays
    By dwamalwa in forum Java Theory & Questions
    Replies: 4
    Last Post: November 27th, 2010, 01:44 AM
  4. Arrays: question about "removing" items.
    By sanfor in forum Collections and Generics
    Replies: 2
    Last Post: November 30th, 2009, 04:09 AM
  5. 2d Arrays
    By mgutierrez19 in forum Collections and Generics
    Replies: 5
    Last Post: October 27th, 2009, 04:08 PM