John4343
asked on
JTable row select
How do I get a row in JTable selected when user clicks on first column in that row?
Rest of the time I want user to be able to block individual or group of cells so I have:
myTable.setSelectionMode(L istSelecti onModel.MU LTIPLE_INT ERVAL_SELE CTION);
myTable.setCellSelectionEn abled(true );
Rest of the time I want user to be able to block individual or group of cells so I have:
myTable.setSelectionMode(L
myTable.setCellSelectionEn
ASKER
Sorry for lack of clarity (and delay is response).
I want user to be able to select an individual cell or a block of cells by clicking and draging across a rectangular block of contiguos cells. In addition select a single row. For row selection I thought I could put a select arrow in the first column which, when clicked, would select the complete row.
I want user to be able to select an individual cell or a block of cells by clicking and draging across a rectangular block of contiguos cells. In addition select a single row. For row selection I thought I could put a select arrow in the first column which, when clicked, would select the complete row.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
thanx 4 axxepting
What do you mean with block?
I don't know if I understand you well, but if you *don't* want users to be able to select individual cells, you should have
myTable.setSelectionMode(L
myTable.setCellSelectionEn
Then clicking in whatever column of a row, selects automatically the whole row.
Is that what you want?