• Post Reply Bookmark Topic Watch Topic
  • New Topic

Saving and Restoring JEditorPane  RSS feed

 
Rudolf Meerkotter
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'd like to save the content from my JEditorPane (in text/rtf format) as a file with formatting in tact, and open again and set the contents of the JEditorPane with what's retrieved from the file. E.g. if something was made bold, it should still be bold if the file is opened...

With text/plain format this is easy. Normal character IO combined with getText and setText. I've searched and found that JEditorPane has a write(Writer) method, but can't find any explanations for it.

Can anyone point me in the right direction please?

Thanks,
Rudolf
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!