Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rich Text Box in Java

 
Derek Boring
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Everyone!

I want to create a text box that can have formatted, editable text inside of it. The formatting should be changed by buttons on a toolbar. I've investigated the JEditorPane, and I've tried using it, but I can never get it to show anything properly. All the tutorials I've looked at weren't any help. I would also like to know how to get the text in HTML, RTF, and plain text.

Thanks in advance guys!
 
Brian Cole
Author
Ranch Hand
Posts: 906
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Derek Boring:
I want to create a text box that can have formatted, editable text inside of it. The formatting should be changed by buttons on a toolbar. I've investigated the JEditorPane, and I've tried using it, but I can never get it to show anything properly. All the tutorials I've looked at weren't any help. I would also like to know how to get the text in HTML, RTF, and plain text.


JEditorPane would seem to meet all your requirements, with the proviso that its HTML support doesn't handle most of the recent developments in HTML. You would just have to create those toolbar buttons yourself.

If you show us your attempts that didn't "show anything properly" we could perhaps give you some pointers.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic