class TxtTableMode extends AbstractTableModel{
ArrayList
@Override
public int getColumnCount() {
return stu.get(0).length;
}
@Override
public int getRowCount() {
return stu.size();
}
@Override
public Object getValueAt(int arg0, int arg1) {
return stu.get(arg0)[arg1];
}
}
用这个TxtTableMode类创建一个模板的对象
TxtTableMode tx = new TxtTableMode();
jt.setModel(tx); //JTable设置模板