Hi all,
I need to develop a text editor with the following two
features:
1. Quoted text should appear in a colour different from
that of normal text.
2. Selected words should be recognized by the editor as
key words and should appear in a colour different from
that of normal or quoted text.
This is new territory for me. I know that I should use a
JTextPane, but after that I'm not sure. I was thinking of
implement a CaretListener and/or a DocumentListener to implement
the aforementioned features. Am I on the right track? Would
implementing a custom EditorKit be a better strategy?
Thanks,
Dennis
I need to develop a text editor with the following two
features:
1. Quoted text should appear in a colour different from
that of normal text.
2. Selected words should be recognized by the editor as
key words and should appear in a colour different from
that of normal or quoted text.
This is new territory for me. I know that I should use a
JTextPane, but after that I'm not sure. I was thinking of
implement a CaretListener and/or a DocumentListener to implement
the aforementioned features. Am I on the right track? Would
implementing a custom EditorKit be a better strategy?
Thanks,
Dennis