posted 22 years ago
Hi!
I want to add some rows or some columns to existing JTable and this the method which I'm using and calling this method when add button is pressed in the frame which contains JTable.
public ListSelectionModel setModel()
{
this.getSelectionModel();
int iMax = selectionModel.getMaxSelectionIndex();
int newMax = iMax + 10;
selectionModel.addSelectionInterval(iMax, newMax);
repaint();
return selectionModel;
}
Can anybody tell me how you can add new rows and columns to JTable.
Thanks.
Simran