Hello everybody,
I'm currently trying to highlight JXTable rows with an Highlighter with a RollOver predicate,
The highlighter I'm trying to set is a BorderHighlighter, with MatteBorder, here is the code:
Highlighter hlrow = new BorderHighlighter(HighlightPredicate.ROLLOVER_ROW, new MatteBorder(1, 0, 1, 0, Color.lightGray),false,false);
flatTable.setHighlighters(hlrow);
Quite simple no ?
However, the thing is that my table won't repaint when I hover on it, that is, the row will get his matteBorder, but when I hover a different row, the previous one won't get back to normal.
At first, I used a custom tableCellRenderer to do that, and I repainted the table with a custom mouseMotionListener, but considering that the size of my table is dynamic, and can get quite huge (up to 50 rows and 500 colums), the repaint becomes really slow when hovering each different row.
So I read on several posts that I should use the swingx decorator class, to avoid repainting the whole table but only cells that changed.
That's what I did, but...
Actually, what I'm really trying to do is highlight the current row and current column I'm hovering. But somehow the predicate HighlightPredicate.ColumnHighlightPredicate isn't recognized by NetBean even though I do all the necessary imports.
I'm using swingx 1.6 .
Any help would be welcome I'm getting headaches here ;)
Thanks.