如题
jtable 绑定的 List对象,表头点击排序后,增加记录后,发现无法定位到刚增加的新纪录上。
this.resultList.add(p);
if (resultList.size() > 0) {
int row = resultList.size() - 1;
row = tablePlan.convertRowIndexToModel(row);
tablePlan.setRowSelectionInterval(row, row);
tablePlan.scrollRectToVisible(tablePlan.getCellRect(row, 0, true));
}
jtable 绑定的 List对象,表头点击排序后,增加记录后,发现无法定位到刚增加的新纪录上。
this.resultList.add(p);
if (resultList.size() > 0) {
int row = resultList.size() - 1;
row = tablePlan.convertRowIndexToModel(row);
tablePlan.setRowSelectionInterval(row, row);
tablePlan.scrollRectToVisible(tablePlan.getCellRect(row, 0, true));
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货