Article View: borland.public.jbuilder.java.swing
Article #635Re: JTextPane KeyEvent
From: John McGrath [TeamB]
Date: Thu, 31 Mar 2005 05:59
Date: Thu, 31 Mar 2005 05:59
22 lines
1743 bytes
1743 bytes
On 3/30/2005 at 7:24:06 PM, Aven wrote:
> The problem arises as, my KeyListener only cares about normal characters,
> not action keys. On KeyPressed events, it sets the caret position to the
> end of document before the characters are entered into JTextPane.
> On KeyTyped events, it performs other actions on the characters.
>
> If I used key binding, should I bind every normal key to the action?
> It seems incovenient though.
I am not sure what you are trying to do. Are you trying to ensure that
characters inserted are always inserted at the end of the buffer? If that
is it, somehow I missed where you said that.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<xn0e0e4pb4w2zzt00s@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<424a7eeb$1@newsgroups.borland.com> <xn0e0dhxr4ianxy00l@newsgroups.borland.com> <424b4319$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,128b4a821bddbb34 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Subject: Re: JTextPane KeyEvent Newsgroups: borland.public.jbuilder.java.swing References: <424a7eeb$1@newsgroups.borland.com> <xn0e0dhxr4ianxy00l@newsgroups.borland.com> <424b4319$1@newsgroups.borland.com> User-Agent: XanaNews/1.17.3.1 Message-ID: <xn0e0e4pb4w2zzt00s@newsgroups.borland.com> X-Ref: newsgroups.borland.com ~XNS:0000033E MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 NNTP-Posting-Host: 141.158.33.210 Date: 30 Mar 2005 21:59:37 -0800 X-Trace: newsgroups.borland.com 1112248777 141.158.33.210 (30 Mar 2005 21:59:37 -0800) Lines: 22 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail