Not with a JTextArea. With a JTextPane yes. JTextArea only supported single
attributed text, all one color/font.
If the text is read-only, you can just add another JLabel to a JPanel,
alternating colors. It is more lightweight then using the text controls.
At 02:13 PM 7/25/2001 +0530, Peter Barraud wrote:
>Hi,
>Is it possible to append text of different colors in a JTextArea
>so basically, every alternate line in the textarea will be an alternate
>color
>black-red-black-red...
John Zukowski, Strategic Java Consulting
JZ Ventures, Inc. - http://www.jzventures.com
Java Collections - http://www.apress.com/catalog/book/1893115925/
The limits of my language are the limits of my world. - Wittgenstein
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing