I'm trying to get a JEditorPane to highlight the full width of a displayed line. All the examples I've tried only highlight the textual content. For example if I have content such as this:
---------------------------------
|Here is some text |
|some more text |
---------------------------------
within a JEditorPane represented by the box above, then highlighting the first row highlights only the 'Here is some text' (represented between [ and ] below).
---------------------------------
[Here is some text] |
|some more text |
---------------------------------
I would like it to highlight the full width of the JEditorPane like the following:
---------------------------------
[Here is some text ]
|some more text |
---------------------------------
Is there a way to do this?