Article View: borland.public.jbuilder.java.swing
Article #1094Re: how to set cancel button and help(F1)?
From: jinxiaojin
Date: Thu, 25 Mar 2004 02:01
Date: Thu, 25 Mar 2004 02:01
33 lines
1820 bytes
1820 bytes
Thanks for your repsponse. I know this way,and I think it is inconvenient. In fact,java give a simple method to proccess enter key. the following code can process enter key. this.getRootPane().setDefaultButton(btn); I think there should be a simple way to process ese and f1. Roel <rgillesen_remove@yahoo.com> wrote: >Hi, > >You have to use keylisteners. > >A good resource is: >http://www.rz.fhtw-berlin.de/javakurs/magelang/awt/sec03-events.html > >Regards, > >Roel > > > > >jinxiaojin wrote: > >> As you know,it is simply to set up a default key(reacting to Enter being pressed) and a cancel key (reacting to ESC being pressed))in dephi. >> I know how to set up default button in java,But I do not know how to set up a cancel button and help button(reacting to F1 being pressed) . >> I found Jbuilder's UI can do it. >> Somebody can tell me how to do it? >> thanks. >> >
Technical Details
Message-ID:
<40623d61$2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mailReferences:
<4060dbec$1@newsgroups.borland.com> <40619668$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,c8b09f43a01db61d X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2004-03-24 18:05:08 PST From: "jinxiaojin" <jinxiaojin@126.com> Sender: "jinxiaojin" <jinxiaojin@126.com> Reply-To: "jinxiaojin" <jinxiaojin@126.com> Subject: Re: how to set cancel button and help(F1)? Newsgroups: borland.public.jbuilder.java.swing X-User-Info: 210.21.227.66 References: <4060dbec$1@newsgroups.borland.com> <40619668$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <40623d61$2@newsgroups.borland.com> Date: 24 Mar 2004 18:01:05 -0800 X-Trace: newsgroups.borland.com 1080180065 207.105.83.66 (24 Mar 2004 18:01:05 -0800) Lines: 35 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail