Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

R Lewis

Greenhorn
+ Follow
since Jul 17, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by R Lewis

I am having the same problem. It appears to be a problem with JTable and the selection model it implements.
In your example the JTable sees rows 2 and 3 and columns 2 and 3 as being selected.
Assuming you have cell selection enabled on the table then JTable sees the intersection of the selected rows and columns as being selected and so cells (2,2), (2,3), (3,2) and (3,3) are displayed as selected. If you try to select cell (2,4) then you should see that the selected cells now appear as (2,2), (2,3) and (2,4) as you are effectively selecting column 4 and deselecting row 3.
I don't know the solution to this one yet, other that overriding the selection yourself but I am continuing to look into it.
20 years ago