Automatically scroll to the selected row in JTable/JScrollPane
Posted on 2004-08-31
I have a program that populates values in a JTable, then sets then selected row. That works fine, but if the number of rows visible without scrolling is say 10 for example, and the the selected row of the table is 90, you need to either scroll manually to see the selection, or press up arrow key, to scroll semi-automatically. Is it possible to have the JScrollPane automatically scroll the the proper position to display the selected row of the JTable?