如题
JTable排序使用TableRowSorter。
初始有默认数据,点击表头排序,排序后用model新增一行数据,报行标越界。
setAutoCreateRowSorter(boolean autoCreateRowSorter) 开启或关闭均无效,求解决办法。
JTable排序使用TableRowSorter。
初始有默认数据,点击表头排序,排序后用model新增一行数据,报行标越界。
setAutoCreateRowSorter(boolean autoCreateRowSorter) 开启或关闭均无效,求解决办法。
一般不用自己写,直接调用setAutoCreateRowSorter(boolean autoCreateRowSorter)就会自动创建一个TableRowSorter.