• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Textbox with multiple fonts,colours,sizes

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to have a TextArea that can have text with different fonts,sizes and colours.
I tried with TextArea but did not work. Is there a way to work this out or is there another class for this ?
Thanks
 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might have to check out the rfteditorkit to do this:

http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/text/rtf/RTFEditorKit.html
 
Anjanesh Lekshminarayanan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. I had a look at this before but its in swing. I was wondering if swing api comes with the JRE because if this api is not available on the client's machine then he wouldn't be able to view it. Or would he ? I don't know because I am pretty new to java.
Thanks
 
Julia Reynolds
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also check out the ekit applet, which uses the htmleditorkit and can serialize files in rtf. http://www.hexidec.com/ekit.php

The Manning Swing book gives an example of writing a simple word processor in Swing. This might be a good place for you to both accomplish the goal of writing a text editor and learn more about Swing. The book is here, and includes some online chapters: http://www.manning.com/sbe/

Julia
[ June 20, 2004: Message edited by: Julia Reynolds ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
reply
    Bookmark Topic Watch Topic
  • New Topic