Im using the DefaultHightlighter.DefaultHightlighterPainter
to highlight text within a java text pane.
I want to remove all highlights (there could be more than one string highlighted) and want it to return the locations of the strings where the highlight has been removed, so obviously I cant use
pseudoCodeTextPane.getHighlighter().removeHighlight(highlight);
Can anyone help? Thanks
How about something like
If you remove all highlights (I suppose with
removeAllHighlights
) you cangetHighlights
before that and use the information you receive there.