• Post Reply Bookmark Topic Watch Topic
  • New Topic

html inside JTextarea

 
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: 20821
68
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!