wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Formatting text in JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Formatting text in JTextArea" Watch "Formatting text in JTextArea" New topic
Author

Formatting text in JTextArea

Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519

How can i format text so that in one single JTextArea i can add one line in one color and the next line in another color?

Thanks and Best regards.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA

Live life to an interface, not an implementation!
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
You can't, try a JTextPane
Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519

Ok thanks.
 
 
subject: Formatting text in JTextArea