This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change color of a particular text in JTextPane.

 
mihir maniar
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to change text of a some text in JTextPane based on the name (like green,red,cyan,etc....)of a colour from a list of dropdown that i provide. how is it possible. ne alternate solutions for the same.
 
Pat Hays
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi mihir

Using HTML instead of plain text in JTextPane
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic