static JTable table; public void refrushTableData() { String[] columnNames = { "1000", "2000", "3000" }; String[][] tableData = { { "1000", "2000", "3000" }, { "1000", "2000", "3000" }, { "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