Article View: borland.public.jbuilder.java.swing
Article #7598Re: ENTER => jump to next field + shortcuts
From: Torsten Welches
Date: Mon, 22 Jan 2001 15:48
Date: Mon, 22 Jan 2001 15:48
22 lines
1731 bytes
1731 bytes
Edilmar, you need to set appropriate keybindings: http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html about the "focus that and not that" problem: JComponent.setNextFocusableComponent(aComponent) Torsten Edilmar Alves <edilmar@intersite.com.br> wrote: >I'm new into Applets and I'm using JB3.5 C/S + JDK 1.3 SUN. >Then, I have wrote an applet that has many JTextFields and JButtons >to Insert/Delete/Update line data into a text file. > >My doubts are: >1) How to write a code that allows ENTER key be used to change to > the next TextField, and, when I'm into last TextField, go to first, not > to next JButton. >2) How to create shortcuts, like "Ins" to Insert button, "Del" to Delete, > "Ctrl+Enter" to Update, etc...
Technical Details
Message-ID:
<3a6c5632$1_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!207.105.83.65References:
<3A6C3C89.8A891BD1@intersite.com.br>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,59b3f13d26c0b55b X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-22 07:52:24 PST From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Sender: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Reply-To: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Subject: Re: ENTER => jump to next field + shortcuts Newsgroups: borland.public.jbuilder.java.swing X-User-Info: 193.158.55.74 193.158.55.74 References: <3A6C3C89.8A891BD1@intersite.com.br> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3a6c5632$1_2@dnews> Date: 22 Jan 2001 07:48:02 -0800 X-Trace: 22 Jan 2001 07:48:02 -0800, 207.105.83.65 Lines: 23 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!207.105.83.65