If you look at the documentation for
JScrollPane, you'll see that it inherits the method scrollRectToVisible from JComponent, which documents the method as:
Forwards the scrollRectToVisible() message to the JComponent's parent. Components that can service the request, such as JViewport, override this method and perform the scrolling.
So you are attempting to tell the component that JScrollPane resides on to scroll What you want to do is tell the JTable's parent (i.e. JScrollPane) to scroll to a particular visible rectangle (and one that isn't one pixel high and one pixel wide):