at 05/22/05 6:03AM
If you need a Java JTable to have the following behaviour:
- click to select a row
- click on the same row to deselect
- never having more than one row selected
.. then add this to your subclassed JTable:
public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend) {
if (getSelectedRow() == rowIndex) {
super.changeSelection(rowIndex, columnIndex, !extend, extend);
} else {
super.changeSelection(rowIndex, columnIndex, false, extend);
}
}
(inspired by
David Shay's weblog)
at 05/12/05 7:18AM
Four weeks since getting back from holiday, and I'm still looking for a new job (the startup that I was working for folded while I was away).
When not busy looking, I've been writing some Java apps to help me find a job:
JobTrawler and
AgencyWatch.
Other than that, John and Ellie came over to Highgate for lunch the other day at the Angel, and we're off down to Brighton on May 28/29th to stay with Ian and see people. I'm really looking forward to that - it's been too long.