I have to columns on my JTable (first name , lastname). Hello How can i loop though each column the first column (first names) and get each row and add it to a String array? for example if the user puts in 10 firstnames i want to add all 10 to a string array. and for the second column i want to add all the rows (last names ) to a arraylist. so if the user puts in 10 lastnames i want to add them to a arraylist. How can i do this? thanks davey
Hi Davey, I may be misunderstanding your question, but I think the easiest way is to get the data from the "JTable"'s associated "TableModel". Use the "JTable" method "getModel()" to retrieve the "TableModel", then use the "getValueAt()" method (of "TableModel") to get the required data. Please see the relevant documentation (javadocs) for more details. Hope this helps. Good Luck, Avi.