|
-
September 30th, 2000, 02:27 PM
#1
setting colors to font
how to set color to a particular font in'
the text area?
help
-
October 1st, 2000, 03:26 PM
#2
Re: setting colors to font
I didn't understand your question exactly.
If you want to have color for whole text in text area depending on what font is set, you can create sub-class of text area and have a hashtable there which will relate fontnames and collors. And in 'setFont' method you can set appropriate color.
If you want text in text area with different colors, java has provided info in JDK1.3 documentation. See javax.swing.JTextComponent. There you will find 'General rules...' link which will take you to java's page for showing multi-colored (styled) text.
Using java.awt.TextArea you cant do such a thing... at least I don't know about it.
- UnicMan
http://members.tripod.com/unicman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|