How do I ensure a specific row is visible in my JTable?

John Zukowski

To ensure a specific row (or cell) is visible, you need to get the rectangle surrounding a specific row/column (cell) than make sure that is visible:

Rectangle rect = 
   table.getCellRect(row, column, true);
table.scrollRectToVisible(rect);
About | Sitemap | Contact