Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
添加一行并调用 fireTableRowInserted() 或添加所有行然后调用 fireTableDataChanged() 是个好主意吗?
如果您所做的只是添加新行,则最好添加所有行,并fireTableRowsInserted()使用适当的第一行和最后一行进行调用。视图只需要处理一个事件,并且该事件准确地说明发生了什么,从而避免刷新视图中不需要刷新的部分。
fireTableRowsInserted()