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
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Formatting text in JTextArea
 
Similar Threads
Insertion in JTextArea
Color text in JTextArea
How to display more than one text colors in JTextArea?
JTextArea Formatting
How to set color of text in Text Area