class MyTableModel extends AbstractTableModel { .... public void setValueAt( Object value , int r , int c ) { objectArray[r][c] = value; .... } public boolean isCellEditable( int r , int c ) { return true; }
....
Object[][] objectArray = ... } 输完每个数据打回车时将调用setValueAt( int , int )函数,把输入的数据保存在你定义的Object[][]中。
OBJECT[][]数组啊你这个J2EE的客户端也是APPLICATION?或者就不是J2EE?
{
....
public void setValueAt( Object value , int r , int c )
{
objectArray[r][c] = value;
....
}
public boolean isCellEditable( int r , int c )
{
return true;
}
....
Object[][] objectArray = ...
}
输完每个数据打回车时将调用setValueAt( int , int )函数,把输入的数据保存在你定义的Object[][]中。