Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages
Started by Envoy
Thu, 08 Apr 2004 10:12
JTextPane & get removed text
Author: Envoy
Date: Thu, 08 Apr 2004 10:12
Date: Thu, 08 Apr 2004 10:12
11 lines
1193 bytes
1193 bytes
Hi, 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? Thanks for your help, Andreas
Re: JTextPane & get removed text
Author: 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads