Article View: borland.public.jbuilder.java.api
Article #632Re: Read only text in JTextPane
From: John McGrath TeamB
Date: Sat, 15 Mar 2003 17:30
Date: Sat, 15 Mar 2003 17:30
22 lines
1622 bytes
1622 bytes
On Sat, 15 Mar 2003 18:10:24 +0200, Lilia Petrova wrote:
> I want to make a part of a text in a JTextPane not
> editable. I am using JEditorPane, HTMLEditorKit and
> HTMLDocument. I've made my own tag that wraps the
> text that I do not want to edit.
>
> Is there any other may be more appropriate way to do
> the same thing?
You can subclass HTMLDocument and override the insertString() method.
If you want to actually insert the text, call the superclass method.
If not, do nothing.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.18dd2d3b7389082998bebd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3e734fc9@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,b5825e1dbd96eff7 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-03-15 09:36:05 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.api Subject: Re: Read only text in JTextPane Date: Sat, 15 Mar 2003 12:30:29 -0500 Message-ID: <MPG.18dd2d3b7389082998bebd@newsgroups.borland.com> References: <3e734fc9@newsgroups.borland.com> X-Newsreader: MicroPlanet Gravity v2.60 NNTP-Posting-Host: 151.197.231.207 X-Trace: newsgroups.borland.com 1047749428 151.197.231.207 (15 Mar 2003 09:30:28 -0800) Lines: 22 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsswitch.lcs.mit.edu!logbridge.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail