Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

change the text color momentarily

 
Araad Izadkhah
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use a JTextPane
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic