You first need to find out which part of the table is visible and then map the visual coordinates to the underlying row:
JViewport viewport = scrollPane.getViewport();
Point p = viewport.getViewPosition();
int rowIndex = table.rowAtPoint(p);
In addition to that you might want to experiment with offsets to p
(such as, e.g., offsetting it by half a row height etc.) depending on the behavior you want to achieve when the first visible row is only partly visible.