I created a small UI application using Java SWT.
The UI contains a JTextArea where specific text parts should be highlighted. I was to able to implement this functionality, so there aren't any issues so far:
Highlighter highlighter = requestPositionTextArea.getHighlighter();
HighlightPainter painter = new DefaultHighlighter.DefaultHighlightPainter(Color.cyan);
As you can see I am using two Integer values startIndex and [endIndex
to highlight a specific part.
Can anyone tell me how I could delete exactly this part of the highlight again?
I saw other examples but they remove all highlights at once which I don't want to do.