Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JTextpane Text Color

Reply
Thread Tools

JTextpane Text Color

 
 
Vincent Poile
Guest
Posts: n/a
 
      11-07-2004
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


 
Reply With Quote
 
 
 
 
Tarlika Elisabeth Schmitz
Guest
Posts: n/a
 
      11-07-2004
Vincent Poile wrote:

> 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
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      11-07-2004
On Sun, 07 Nov 2004 16:48:58 GMT, Vincent Poile wrote:

> 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.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      11-07-2004
On Sun, 07 Nov 2004 16:52:01 +0000, Tarlika Elisabeth Schmitz wrote:

> Vincent Poile wrote:
>
>> 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


Good point, you'll probably get better thought out
answers than 'use a JEP' on c.l.j.g.

For a quick summary of the major Java groups, check..
<http://www.physci.org/codes/javafaq.jsp#groups>

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
 
Reply With Quote
 
Vincent Poile
Guest
Posts: n/a
 
      11-07-2004
Ok thanks
"Andrew Thompson" <> wrote in message
news:1wyw0rnxyudxl$... .
> On Sun, 07 Nov 2004 16:52:01 +0000, Tarlika Elisabeth Schmitz wrote:
>
>> Vincent Poile wrote:
>>
>>> 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

>
> Good point, you'll probably get better thought out
> answers than 'use a JEP' on c.l.j.g.
>
> For a quick summary of the major Java groups, check..
> <http://www.physci.org/codes/javafaq.jsp#groups>
>
> --
> Andrew Thompson
> http://www.PhySci.org/codes/ Web & IT Help
> http://www.PhySci.org/ Open-source software suite
> http://www.1point1C.org/ Science & Technology
> http://www.LensEscapes.com/ Images that escape the mundane



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
finding text in formatted JTextPane by using scanner Ironsienna Java 0 11-29-2006 12:48 PM
How to handle <Script> tag in javax.swing.text.JTextPane ? Rawash Java 1 12-10-2005 07:26 AM
Change text color for one document.write but not color of all text? kroger@princeton.edu Javascript 7 02-02-2005 01:23 PM
Change text color of "visited link" back to unvisited color ??? Matt Adams HTML 0 08-26-2003 10:27 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57