Getting the Anchor Cell in a JTable Component
The anchor cell in a table component is the cell that received the
most recent mouse click. In some applications, the content of the
anchor cell is automatically displayed in another larger and more
convenient editing text area.
public void getAnchorCell(JTable table) {
int rowIndex = table.getSelectionModel().getAnchorSelectionIndex();
int vColIndex = table.getColumnModel().getSelectionModel()
.getAnchorSelectionIndex();
}
Post a comment