aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to color a particular word in a jtextpane? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply locked New topic
Author

how to color a particular word in a jtextpane?

naved momin
Ranch Hand

Joined: Jul 03, 2011
Posts: 692

i have searched in the google but all examples are quite complex so this is my code can you give a example code to color a particular text like "void"
so that i can learned it in a simple way
please


The Only way to learn is ...........do!
Visit my blog http://inaved-momin.blogspot.com/
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
You should have asked to have your thread moved here. This looks like a duplicate of this thread, so I shall close it. If I am mistaken, Jelle, Robert, Rob, feel free to reopen it.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to color a particular word in a jtextpane?