Answer the question
In order to leave comments, you need to log in
Displaying selected text in swing?
I am using the JTextPane class.
It is necessary, when working in some other component, to highlight the selected text of the JTextPane without passing the focus. By default, selected text is only highlighted if the JTextPane has received focus.
Do not offer options for playing with JTextPane styles - they are used in an honest way, and I really don’t want to do a hack where there is clearly a better solution.
What can be done in such a case?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question