I have a query ... code is running fine, but am not able to get value of last cell of last row and last column. Below is the code... pls guide
with this code am adding rows dynamically to JTable : if(e.getSource()==addb) {
model.addRow(new Object[3]);
repaint();
}
Below is the code for getting values from JTable row wise and later on instead of System.out.println() am going to send data to database...
if(e.getSource()==submit)
{
int j = table.getRowCount();
for(int row=1;row<j;row++)
{
for(int column=0;column<3;column++)
{
System.out.println("row "+row+" Column is "+column);
System.out.println(model.getValueAt(row, column));
}
}
}