Article View: borland.public.jbuilder.java.swing
Article #1125Re: JTextPane & get removed text
From: ak
Date: Sun, 11 Apr 2004 10:45
Date: Sun, 11 Apr 2004 10:45
14 lines
1670 bytes
1670 bytes
> I'm programming a text editor and use a JTextpane for it. > I added a DocumentListener to it, so that the functions insertUpdate() and > removeUpdate() are called everytime when someone inserts or removes text. > Now in the function removeUpdate() i somehow need to know which text was removed > as a String. > Is this possible? not with removeUpdate() - it called *after* changes were made. the easy way is to override Document#remove(int off, int len) method. ____________ http://reader.imagero.com the best java image reader.
Technical Details
Message-ID:
<c5b7k0$mfo$1@online.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mailReferences:
<MPG.1adf43fc1d2ff271989695@news.individual.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,7b9f73afcf4ade3d X-Google-Attributes: gid111d45,public X-Google-Thread: 10fd6d,7b9f73afcf4ade3d X-Google-Attributes: gid10fd6d,public X-Google-ArrivalTime: 2004-04-11 03:45:20 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!npeer.de.kpn-eurorings.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: "ak" <spam@imagero.com> Newsgroups: borland.public.jbuilder.java.swing,comp.lang.java.gui Subject: Re: JTextPane & get removed text Date: Sun, 11 Apr 2004 12:45:19 +0200 Organization: 1&1 Internet AG Lines: 16 Message-ID: <c5b7k0$mfo$1@online.de> References: <MPG.1adf43fc1d2ff271989695@news.individual.net> NNTP-Posting-Host: pd9e7d4be.dip0.t-ipconnect.de X-Trace: online.de 1081680320 23032 217.231.212.190 (11 Apr 2004 10:45:20 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Sun, 11 Apr 2004 10:45:20 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106