Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.IllegalArgumentException: Identifier not found

843807Oct 19 2009 — edited Oct 19 2009
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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 16 2009
Added on Oct 19 2009
6 comments
2,134 views