I am trying to create a Jtable using Vectors. When I compile the code I get the following error. What is the cause of this error?
C:\j2sdk1.4.1_04\bin\dev\Table>
java SimpleTableDemo
Exception in
thread "main" java.lang.ClassCastException
at javax.swing.table.DefaultTableModel.justifyRows(DefaultTableModel.jav
a:238)
at javax.swing.table.DefaultTableModel.setDataVector(DefaultTableModel.j
ava:194)
at javax.swing.table.DefaultTableModel.<init>(DefaultTableModel.java:131
)
at javax.swing.JTable.<init>(JTable.java:392)
at SimpleTableDemo.<init>(SimpleTableDemo.java:29)
at SimpleTableDemo.main(SimpleTableDemo.java:70)