Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

using colors in TextArea  RSS feed

 
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
Ranch Hand
Posts: 15304
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
Boost this thread!