I am currently developing a program that allows you to change the color of a selected text from a JEditorPane
, using setSelectedTextColor (Color.red)
, but it only temporarily changes the text when I run it with the cursor.
I would like to know how I can set it or change it, as well as the setForeground