Adding custom highlight to JEditorPane
In my application i would like to highlight some words with specific text color without touching anything of model. this highlight is meant to represent information that is kind of volatile and has nothing to do with Document. (say, i want to highlight words as they are spoken by TTS). If changing background of text was everything i need, i could simply use Highlighter but i actually have to do something about color of text that is being highlighted. JTextPane seems to be not really flexible at this point - all it provides is selected text color. I absolutely dont want to put up with selection color as implementation basis of this feature.
I would greatly appresiate any help.