Hi. I'm having trouble with adding info that is in an array, in a JTable. I create a JTable:
Then, in some method, i add headers to the table:Code:Vector rows = new Vector(); Vector columns = new Vector(); JTable table = new JTable(rows, columns); JScrollPane scrollpane = new JScrollPane(table);
The prolem is to add info to the rows, as it's read from a file, and placed in an array: read lines from file, separate them by " ", and place each string in an array[i]. How can i get the info in array[i] inside the rows in the table? sorry for my bad explanation... ask if u don't understand what i meanCode:columns.add("Header1"); columns.add("Header2"); columns.add("Header3");


Reply With Quote


Bookmarks