• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading from HTMLEditorKit doesn't display text while in text/html content type?

 
Dan Kao
Greenhorn
Posts: 18
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm working on a simple text editor, and I'm currently saving the contents of my JTextPane in a file using an HTMLEditorKit (text is a JTextPane):



The problem I'm having is that after opening a file that I saved, it does not display (if I disable text/html, it displays the entire html code, but when I re-enable it, nothing displays at all.) Am I loading it wrong, or am I setting the JTextPane's text incorrectly? Or is it, perhaps, another error that I didn't catch?

Thanks for the help!
 
Campbell Ritchie
Marshal
Posts: 52519
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would fit better in our GUIs forum so I shall move the discussion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!