不知道你定义成这样的目的是什么???改成这样定义看看。
TableModel dataModel = new MyTableModel () ;
.............
class MyTableModel extends DefaultTableModel
{
public int getColumnCount() { return 5; }
public int getRowCount() { return 5;}
public Object getValueAt(int row, int col) { return new Integer(row*col); }}
TableModel dataModel = new MyTableModel () ;
.............
class MyTableModel extends DefaultTableModel
{
public int getColumnCount() { return 5; }
public int getRowCount() { return 5;}
public Object getValueAt(int row, int col) { return new Integer(row*col); }}
没有问题,可以运行!
我的是jdk1.3