• Post Reply Bookmark Topic Watch Topic
  • New Topic

html inside JTextarea  RSS feed

 
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
 
Sheriff
Posts: 21327
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.
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!