Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Swing / AWT / SWT and the fly likes change the text color momentarily Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "change the text color momentarily" Watch "change the text color momentarily" New topic

change the text color momentarily

Araad Izadkhah

Joined: Nov 07, 2005
Posts: 15
hey folks,
I have a JTextArea that I want to display different things in different color. everytime i use the setForground(Color.whatever) it changes the whole thing, even when i set it back to the original.

any idea?
thx in advance
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
use a JTextPane
I agree. Here's the link:
subject: change the text color momentarily
It's not a secret anymore!