更新时间:2023-12-03 12:45:34
如果你想通知你的 JTable
关于你的数据的变化,使用tableModel.fireTableDataChanged()
If you want to notify your JTable
about changes of your data, usetableModel.fireTableDataChanged()
来自 文档:
通知所有侦听器表格行中的所有单元格值可能已更改.行数也可能发生了变化,JTable 应该从头开始重新绘制表格.假定表的结构(按照列的顺序)是相同的.
Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the JTable should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.