as you cannot transfer the focus itself programmatically to a particular cell, you either have to use the selection or you have to use a special cell renderer you attach and detach whenever the mouse happens to enter a row or to exit it. I don't know how much this will slow down the table performance. but as the rollover effect is normally coupled to the selection of a row (most of the time the user will select some row while she is moving with the mouse over the table) - i would use the selection of the table to achieve a rollover effect. if you want to display the rollover in another color than the actual selection, you can change the selection background and foreground on the fly. I did that for highlighting search results and differentiate them from user selections. the drawback is that you cannot have different selection colors at the same time. chantal
Joined: Feb 17, 2002
Thanks a lot!
Joined: Sep 28, 2000
hi again, I just realized that the code makes not sense, well, part of the code at least:
Hi, Your code snippet does help! However, when mouse moves over one specific row, instead of changing the color only, the row has been selected(This lost lots of conveniences). I've also browsed the url you recommanded. If adding such little a function costs so much, I'll give up it. Thanks anyway! Best Regards, Vincint