1. When we want to highlight one particular row in a JTable, we could call:
getTable().setRowSelectionInterval(i, i);
2. When we want to show a particular row/cell in a JTable inside a JScrollPane, we could call,
getTable().scrollRectToVisible(getTable().getCellRect(row, 0, true));
But it doesn't work so well if we overwrite the DefaultTableCellRenderer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment