Could you add a second marker?
jxTable.getHighlighters().addHighlighter()
One that will only be applied when the JXtable is effectively filtered.
If this is not possible, because once the line has been highlighted, the other callers cannot be called, you can define a controller that:
a) has aChangeListner property for a table, listening for filtered state
b) has a special predicate with a rowset and marker
c) on propertyChange, check the line, switch the marker predicate from NEVER and your custom one, if necessary. Changing a shortcut property will cause a redraw
Forcing redrawing is basically a sample of the HighlighterClientVisualCheck in the test.org.jdesktop.swingx.renderer package.
source share