Posted By:
Prashanth_Godey
Posted On:
Wednesday, August 1, 2001 11:04 AM
try this to "catch the row click"...
ListSelectionModel rowSM = table.getSelectionModel();
rowSM.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
//Ignore extra messages.
if (e.getValueIsAdjusting())
return;
ListSelectionModel lsm =
(ListSelectionModel)e.getSource();
if (lsm.isSelectionEmpty()) {
// System.out.println("no rows are selected");
//no rows are selected
} else {
int selectedRow = lsm.getMinSelectionIndex();
selectRow=selectedRow;
}
}