Thursday, 22 August 2013

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JTable$1 cannot be cast to javax.swing.table...

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
javax.swing.JTable$1 cannot be cast to javax.swing.table...

when I trying to copy table data to an array, this run time exception got.
And I used
DefaultTableModel model = new DefaultTableModel(dataValues, columnNames);
jtable.setModel(model);
I used setModel method of table to set model. Still the problem exists.
please provide me the sample code.

No comments:

Post a Comment