Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Textbox with multiple fonts,colours,sizes  RSS feed

 
Anjanesh Lekshminarayanan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • 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
 
Julia Reynolds
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • 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: 46
  • Mark post as helpful
  • send pies
  • 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
  • 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 ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!