JTextpane Text Color

V

Vincent Poile

Hi, i want to change the color of specific words, in a JTextpane, without
changing the rest of the text, is this possible if so how would i go about
doing it,
I will have an array of words which i want to match against and then the
text in the JTextpane will be random and i would like to be able to do this
automatically if possible Thanks for you help Vince
 
T

Tarlika Elisabeth Schmitz

Vincent said:
Hi, i want to change the color of specific words, in a JTextpane, without
<snip>

This is really a question for c.l.j.gui


--


Regards/Gruß,

Tarlika Elisabeth Schmitz
 
A

Andrew Thompson

Hi, i want to change the color of specific words, in a JTextpane, without
changing the rest of the text, is this possible if so how would i go about
doing it,

You might use a JEditorPane and wrap your content in HTML.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top