• Post Reply Bookmark Topic Watch Topic
  • New Topic

html inside JTextarea  RSS feed

 
Hamsagayathri Palanisamy
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can anyone please say me how to add html tags inside JTextarea?
Thanks in Advance.

-Thanks & Regards,
Hamsa
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JEditorPane or JTextPane to display HTML. You might want to call setEditable(false) on the JEditorPane to make it look better, but users won't be able to edit it.

JTextArea is much less capable of using different styles.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!