Here you can find the source of showCell(JTable table, int row, int column)
public static void showCell(JTable table, int row, int column)
//package com.java2s; //License from project: Open Source License import javax.swing.*; import java.awt.*; public class Main { public static void showCell(JTable table, int row, int column) { if (row >= table.getRowCount()) row = table.getRowCount() - 1; Rectangle rect = table.getCellRect(row, column, true); table.scrollRectToVisible(rect); table.clearSelection();// ww w. ja v a 2 s .c o m table.setRowSelectionInterval(row, row); } }