I am doing a document editor program in java. The problem is that how to change the java keywords color in a TextArea or JTextArea when we inputing characters in the edition-area?
I mean the keywords dispalying in one color,while the not-keywords string displaying in another color.
The following methods obviously don't make it: void setForeground(Color c) void setSelectedTextColor(Color c) void setSelectionColor(Color c)
I am now puzzled. If can't,can the JEditorPanel or JTextPanel make it?