Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2484
| From | "Chanchal" <chanchal@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Default key behavior |
| Message-ID | <1190213083.334432.126140@g4g2000hsf.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1190188177.130175.169260@r29g2000hsg.googlegroups.com> |
| Date | 2011-04-27 15:39 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui On Sep 19, 3:49 am, AimsLife <momer...@gmail.com> wrote: > Hi, > > I am using jdk1.5 development kit for development. I am developing > desktop base application. I created a frame (JFrame frm), added two > buttons with label "OK" and "Cancel", some text fields and labels. I > want to know, how I can define default behavior of frame on key > stokes, mean to say, if I pressed ESC key any time then frame should > perform "Cancel" behavior and "OK" behavior on press ENTER any time. > Is it possible without adding listener in all components? > > Regards, > -aimslife I guess you'll have to implement KeyListener for the Frame --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Default key behavior of J "AimsLife" <aimslife@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000 Re: Default key behavior "Chanchal" <chanchal@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000 Re: Default key behavior "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:39 +0000
csiph-web