Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using colors in TextArea

 
moshe zochmir
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
Do you know how to change the colors of the font in a textArea
so some lines could be blue other red etc ?
i can use AWT,Swing or whatever else is necessary,
any code examples, links suggestions would be welcomed,
yo
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JTextPane does not support that. You have to use JEditorPane.

------------------
Happy Coding,
Gregg Bolinger
 
Sajee Joseph
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U can do it using JTextPane
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic