📜  数据表添加行 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:32.080000             🧑  作者: Mango

代码示例2
private void jButton1ActionPerformed(java.awt.event.ActionEvent) {
    String data1 = something1.getSomething();
    String data2 = something2.getSomething();
    String data3 = something3.getSomething();
    String data4 = something4.getSomething();

    Object[] row = { data1, data2, data3, data4 };

    DefaultTableModel model = (DefaultTableModel) jTable1.getModel();

    model.addRow(row);

    // clear the entries.
}