Article View: borland.public.jbuilder.java.swing
Article #440Re: Swap TAB and Ctrl-TAB for JTextArea
From: John McGrath [TeamB]
Date: Thu, 19 May 2005 01:47
Date: Thu, 19 May 2005 01:47
25 lines
1736 bytes
1736 bytes
On 5/16/2005 at 3:32:48 PM, Magnus wrote:
> textArea.addKeyListener(new KeyAdapter(){
> public void keyPressed(KeyEvent ke){
> if(ke.getKeyCode() == KeyEvent.VK_TAB)
> {
> ke.consume();
> [nextComponent].requestFocus();
> }}});
It looks like you are just trying to customize the tab order. If that
is the case, you should look at java.awt.FocusTraversalPolicy. For more
information on Swing/AWT focus handling, see the trail "How to Use the
Focus Subsystem" in the Java Tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/misc/focus.html
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<xn0e2eokm9yv9kb000@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4288af18@newsgroups.borland.com> <4288beb7@newsgroups.borland.com> <4288f55a$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 111d45,21a389bc4e56d7b7 X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "John McGrath [TeamB]" <ng-b@JPMcGrath.net> Subject: Re: Swap TAB and Ctrl-TAB for JTextArea Newsgroups: borland.public.jbuilder.java.swing References: <4288af18@newsgroups.borland.com> <4288beb7@newsgroups.borland.com> <4288f55a$1@newsgroups.borland.com> User-Agent: XanaNews/1.17.4.1 Message-ID: <xn0e2eokm9yv9kb000@newsgroups.borland.com> X-Ref: newsgroups.borland.com ~XNS:00000407 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 NNTP-Posting-Host: 151.197.212.47 Date: 18 May 2005 18:47:10 -0700 X-Trace: newsgroups.borland.com 1116467230 151.197.212.47 (18 May 2005 18:47:10 -0700) Lines: 25 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail