• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Saving and Restoring JEditorPane

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic