This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin 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!