i want to delete all columns of my jtable because it comes with four default columns as well as 4 default rows.
the code below wont work
for(int i=1;i<=jTable1.getColumnCount();i++)
{
jTable1.removeColumn(jTable1.getColumn(i));
}
it gives this exception :
run:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Identifier not found
at javax.swing.table.DefaultTableColumnModel.getColumnIndex(DefaultTableColumnModel.java:265)
why do i get this error? what should i do ?
Thanks.