This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTML in JTextPane/Editor

 
cardwell cupp
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys...I am working on a program that displays html in a JTextPane. When I load a file with setView(someFile), it works just fine, but if I just do setText(), I get the html as plain text. I don't want to have to write the html to a file just to make it work. Any suggestions/solutions?
Thanks All
Cardwell
 
vicky bawge
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you thought of using JEditorPane.
Have you tried to invoke setContentType("text/html")
Vicky
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic