|
Add data to an array
I have a program that I want to set up to allow the user to be able to input as much data at a time as they wish. The user puts the data into a jtextfield on a form and than hits a get data button to grab the information. Once it is grabbed I want to add the info to an array. I know how to add the data to an array within a for loop but when I tried to do it all the values in the array were the same no matter what I put into the form. Do I have to use a for loop to add the data to the array or can it be done with just statements. I ask because the array really is not a set size as the user can change the number of entries they enter each time.
Any thoughts?
|