File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 JavaScript Promises Essentials this week in the JavaScript 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: 526

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: 526

Ok thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Formatting text in JTextArea