I am attempting to use hyperlinks inside of a JEditorPane
for certain words, similar to the idea of clicking a word to get its definition. As words are typed into the editor pane, the program is checking them against a list and replacing listed words with an <a href="..." >some word</a>
tag.
My problem is that after the word is replaced with the tag, I cannot get the editor pane to stop adding any following keystrokes to the text located inside the tag. How do I break out of the <a>
tag to again start typing normally?
And yes, I am aware that hyperlink events only fire when the editor pane is not editable. I'm working around that with mouse events.