🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #8452

How to change color of text selectively ?

#8452
From: Vikas Chauhan
Date: Wed, 23 Aug 2000 00:00
9 lines
960 bytes
I wish to change the color of a keyword the moment it is typed in the
JTextArea . I have made my  own document class extending PlainDocument
and I am successfully able to trap the event that my keyword has been
typed . But ...but... how do i change the color of that particular word
? I did not find any way to selectively change the text color.

Please help.
thanking u in anticipation ...
Vikas
Technical Details
Message-ID: <39A3E512.41163421@patni.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,4cb68b7390a5ec27,start
X-Google-Attributes: gid111d45,public
From: Vikas Chauhan <vikas.chauhan@patni.com>
Subject: How to change color of text selectively ?
Date: 2000/08/23
Message-ID: <39A3E512.41163421@patni.com>
X-Deja-AN: 661482684
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 23 Aug 2000 03:10:09 -0800, 199.92.207.56
Organization: PCS Ltd.
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing