Java Swing - JTable在新增一行数据,让指针聚焦于新加入的那一行
tableTaskTest.setRowSelectionInterval(tableTaskTest.getRowCount()-1,tableTaskTest.getRowCount()-1);Point p = new Point();p.setLocation(0, tableTaskTest.getSelectedRow()*tableTaskTest.getRowHeight());scrollPaneTaskTest.getViewport().setViewPosition(p)