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);
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact