public void clearTable(JTable table)
{
int numRows = table.getRowCount();
int numCols = table.getColumnCount();
javax.swing.table.TableModel model = table.getModel();
for (int i=0; i < numRows; i++)
{
for (int j=0; j < numCols; j++)
{
model.setValueAt(null, i, j);
}
}
}
By http://naijadukes.net/jand/index.php?action=profile;u=11
Advertisements
Leave a Reply