NetBeams jTable的默认代码如下所示:
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{ new Integer(1), "Name1", "Description1"},
{ new Integer(2), "Name2", "Description2"}
},
new String [] {
"Number", "Name", "Description"
}
) {
Class[] types = new Class [] {
java.lang.Integer.class, java.lang.Object.class, java.lang.Object.class
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
});
但是如何插入自动行数呢?