Hi,
how can I read and write the color and font on a JEditorPane for a given selection? Currently I am using RTF content. So the underlying document is a StyledDocument and the EditorKit is an RTFEditorKit, if that helps.
I found the getFont() method on the StyledDocument, that takes an AttributeSet. But I have no idea, where to get that from. And I also need to set the font (as well as color).
Also the font looks slightly different to how the exact same RTF looked in my old VB6 application (messes up formatting through tabulators). Is there a trick to fix this?
Any help is greatly appreciated. Thanks in advance.
Marvin