Hi,
I am trying to highlight JTable rows on mouse rollover.. Currently what I do is
table.addMouseMotionListener (new MouseMotionListener() {
public void mouseMoved (MouseEvent me) {
int row = table.getRowAtPoint(me.getx(),me.gety());
if (row >=0)
changeSelection (row, 0, false, false);
}
public void mouseDragged(MouseEvent me) {}
}
As obvious from the "changeSelection" this actually changes the selection. The required behavior should be that rows get highlighted on rollover, but that doesn't change the actual selection..
From what I understand, I could use cell renderers, but not sure how exactly..
Any suggestions welcome!