wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 688

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: 38107
    
  22
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to color a particular word in a jtextpane?
 
Similar Threads
Multithreading: bouncing balls problem
Can't generate java classes from WSDL file
change text color of highlighter
How to set the cursor position to new line when a specific char is typed
how to paint a particular word in a string ?