Reputation: 166
I have a JTable, which has comboboxes and text fields. I want to have a save button, which saves all the data from the jtable into an arraylist. I've found some examples but they were all unhelpful. The Table is using the defaultTableModel. How do I read the inputs after the push of the save button?
Upvotes: 0
Views: 672
Reputation: 347314
DefaultTableModel#getValueAt(col, row)
, if you want to read each cell individually...
DefaultTableModel#getDataVector()
, which returns a Vector
of Vector
s, where the outter is the rows and the inner are the columns, if you want to process the rows/columns in some speical way...
Upvotes: 2