Hi folks,
I'm building a simple text editor using a JEditorPane and simple I/O streams - so far, it works like a charm.
My only question is this: I have the capability to change text colour, text font, and apply attributes like bold, italic etc. without problem. Unfortunately, changing the text attributes will change ALL of the text as opposed to only the text that has been hilighted (blocked) with the mouse. I'm having trrouble changing the attributes of a selected
word only rather than changing the text attributes of the entire JEditorPane.
Anyone done this before? Maybe a TextListener would work?
One more question: what approach would I take in order to save those attributes (say, green text) into a file that would remember text attributes when loaded into the editor from file?