🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #12060

How to set default ENTER and ESCAPE actions?

#12060
From: Carlos Javier Castro Pena
Date: Mon, 01 Mar 1999 00:00
9 lines
900 bytes
How can I set in an JInternalFrame the following:

-when the user presses ENTER, an enterButton.doClick() is executed
-when the user presses ESCAPE, an escapeButton.doClick() is executed


Is there some example? I set the keyPressed() event for each element,
but it work only when the element has focus. I'd like to implement it in
a moregeneral way.
Technical Details
Message-ID: <36DB4561.F2B1F55C@ittc.ukans.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,3b20cc5014a3aa77,start
X-Google-Attributes: gid111d45,public
From: Carlos Javier Castro Pena <jcaspen@ittc.ukans.edu>
Subject: How to set default ENTER and ESCAPE actions?
Date: 1999/03/01
Message-ID: <36DB4561.F2B1F55C@ittc.ukans.edu>
X-Deja-AN: 450203874
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: ITTC - University Of Kansas
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing