jtable更新数据

  static JTable table;

    public void refrushTableData() {

        String[] columnNames = { "", "", "" };
String[][] tableData = { { "", "", "" },
{ "", "", "" }, { "sept", "siete", "sette" } }; DefaultTableModel dtm = new DefaultTableModel(tableData, columnNames);
table.setModel(dtm);
// dtmView.fireTableDataChanged();
dtm.fireTableStructureChanged();
}

另有一篇写的比较好的  http://www.cnblogs.com/langtianya/archive/2012/12/07/2807153.html

上一篇:Code4 APP


下一篇:现代控制理论习题解答与Matlab程序示例