wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes using colors in TextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "using colors in TextArea" Watch "using colors in TextArea" New topic
Author

using colors in TextArea

moshe zochmir
Greenhorn

Joined: Aug 26, 2001
Posts: 1
hi there,
Do you know how to change the colors of the font in a textArea
so some lines could be blue other red etc ?
i can use AWT,Swing or whatever else is necessary,
any code examples, links suggestions would be welcomed,
yo
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

JTextPane does not support that. You have to use JEditorPane.

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200
U can do it using JTextPane
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using colors in TextArea
 
Similar Threads
Have multicolor text in the same textarea(urgent)
Word wrapping in Canvas !!!!
Text Area..please help urgent
displaying words in different fonts or colors in a textarea
WA #2 ..... word association