Article View: borland.public.jbuilder.java.swing
Article #1095Re: how to set cancel button and help(F1)?
From: Lori M Olson (TeamB)
Date: Thu, 25 Mar 2004 04:18
Date: Thu, 25 Mar 2004 04:18
35 lines
2211 bytes
2211 bytes
jinxiaojin wrote:
> 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.
>
If you define an Action for "Esc", and an Action for "F1", then you can
assign these actions to the specific buttons using the
"configurePropertiesFromAction( Action a )" method.
I think that's as close to simple as you are going to get.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
Technical Details
Message-ID:
<40625d87$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.moat.net!lon-transit.news.telstra.net!lon-in.news.telstra.net!news.telstra.net!mws-stat-syd.cdn.telstra.com.au!newsx!newsgroups.borland.com!not-for-mailReferences:
<4060dbec$1@newsgroups.borland.com> <40619668$1@newsgroups.borland.com> <40623d61$2@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 20:40:16 PST Date: Wed, 24 Mar 2004 21:18:21 -0700 From: "Lori M Olson (TeamB)" <javadragon@techie.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing Subject: Re: how to set cancel button and help(F1)? References: <4060dbec$1@newsgroups.borland.com> <40619668$1@newsgroups.borland.com> <40623d61$2@newsgroups.borland.com> In-Reply-To: <40623d61$2@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 142.179.181.200 Message-ID: <40625d87$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080188295 142.179.181.200 (24 Mar 2004 20:18:15 -0800) Lines: 36 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.moat.net!lon-transit.news.telstra.net!lon-in.news.telstra.net!news.telstra.net!mws-stat-syd.cdn.telstra.com.au!newsx!newsgroups.borland.com!not-for-mail