T
Tom Davies
I'm writing an application which will produce a slideshow of jpgs. Part
of the slide is text, which I want to allow the user to edit in a JTextPane.
I understand how to use a JTextPane along with a StyledEditorKit to
produce a StyledDocument, and I understand how to use AttributedString
and TextLayout to draw styled text onto a BufferedImage.
I'm having trouble putting the two together: is there an easy way to get
AttributedStrings out of my JTextPane? Or can I somehow use a JtextPane
to render to my BufferedImage directly?
Thanks,
Tom
of the slide is text, which I want to allow the user to edit in a JTextPane.
I understand how to use a JTextPane along with a StyledEditorKit to
produce a StyledDocument, and I understand how to use AttributedString
and TextLayout to draw styled text onto a BufferedImage.
I'm having trouble putting the two together: is there an easy way to get
AttributedStrings out of my JTextPane? Or can I somehow use a JtextPane
to render to my BufferedImage directly?
Thanks,
Tom