I need to highlight every other row in my JTable. With old version of swingx it could be done like this:
table.setHighlighters(new HighlighterPipeline(new Highlighter[] { new AlternateRowHighlighter(
color1, color2,color3 }));
but now, with swingx 1.6, method setHighlighters() can't accept those parameters. It says "The method setHighlighters(Highlighter...) in the type JXTable is not applicable for the arguments (HighlighterPipeline)"
So how can i do it with new swingx?
prepareRenderer()
inJXTable
? – PutschJTable.prepareRenderer()
. – Sewing"Table.alternateRowColor"
UIManager property now causes it to render stripes out of the box in maybe all the L&Fs. It's done insideDefaultTableCellRenderer
, so it could be that all currently-used L&Fs support it. So thinking about it now, some other UIManager property might make JXTable do it for all its tables by default... but I haven't read that deeply into the code and it is probably less hacky to use a highlighter anyway, it's just that using a highlighter means I have to change every table class in my app. – Bobbibobbie