This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
Don't get me started about those stupid light bulbs.
 
subject: Formatting text in JTextArea
 
Similar Threads
How to display more than one text colors in JTextArea?
JTextArea Formatting
How to set color of text in Text Area
Color text in JTextArea
Insertion in JTextArea