Article View: borland.public.jbuilder.java.swing
Article #9246Re: (newbie one) JTextPane styles
From: Paul Furbacher [TeamB]
Date: Wed, 03 May 2000 00:00
Date: Wed, 03 May 2000 00:00
21 lines
1373 bytes
1373 bytes
> Neil asked: > > > > Can anyone point me in the right direction to highlighting individual > > parts of the text in a jTextPane component? As in making certain words > > appear in bold type or different colours. Joi Ellis wrote: > > > As one newbie talking to another... look up the classes around > javax.swing.text.Document and javax.swing.text.StyledDocument. > > http://java.sun.com/products/jdk/1.2/docs/api/javax/swing/text/Document.html > http://java.sun.com/products/jdk/1.2/docs/api/javax/swing/text/StyledDocument.html You might also want to take a look at Keith Topley's second "Core Swing" book which is subtitled "Advanced Programming". He covers Documents and Styles quite thoroughly. Paul Furbacher (TeamB)
Technical Details
Message-ID:
<3910626A.DB8BF3F9@home.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<390F2B00.98CC82C8@ip3.com> <390F4467.496D8C94@aravox.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,1ace1129168d2055 X-Google-Attributes: gid111d45,public From: "Paul Furbacher [TeamB]" <pnf@home.com> Subject: Re: (newbie one) JTextPane styles Date: 2000/05/03 Message-ID: <3910626A.DB8BF3F9@home.com> X-Deja-AN: 618773103 Content-Transfer-Encoding: 7bit References: <390F2B00.98CC82C8@ip3.com> <390F4467.496D8C94@aravox.com> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: pnf@home.com Newsgroups: borland.public.jbuilder.java.swing