11
I am trying to use JTable in the way where new data record are added to the end. The strange thing is the scroll bar does not go to the end of the table; instead, it always shows the second from the last. Any way to tell the scroll bar to always go to the end of the table?
Here is part of my code:
table.scrollRectToVisible(table.getCellRect(table.getRowCount()-1, 0, true));