• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Rich Text Box in Java

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Author
Posts: 986
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic