![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e944. Getting the Anchor Cell in a JTable ComponentThe 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(); }
e940. Enabling Single or Multiple Selections in a JTable Component e941. Programmatically Making Selections in a JTable Component e942. Getting the Selected Cells in a JTable Component e943. Disabling Selections in a JTable Component
© 2002 Addison-Wesley. |