How to highlight all the text in a JTextPane?
问题 jTextPane1.selectAll(); With the correctly shared events, that command permit to highlight the text in a JTextPane area (I am a bit rusty, I need to not forget to share the "good event focus priorities" ; thank you to : MadProgrammer) 回答1: Since selectAll is a method of JTextComponent , which JTextPane extends from I would take a wild guess and say, probably, yes. Five minutes of coding probably would have gotten you the same answer yourself... Highlighting not seem to appear in the jTextPane