Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #4191
| From | "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Detect when menu is c |
| Message-ID | <ga93cs$aaa$1@registered.motzarella.org> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <7010b8f0-dc1c-4784-a513-cc4e7a9ac4c5@59g2000hsb.googlegroups.com> |
| Date | 2011-04-27 15:49 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Wed, 10 Sep 2008 11:15:47 -0700 (PDT), /wx/: > Now, assume you move your mouse over B and actually click on B (which > is a JMenu). What I would like is that the action listener I > registered this receives this. The only thing I get is mouse clicked > event, as demonstrated by the example. I cannot get keyboard events, > nor can I get action events. This is logically incorrect from my > perspective: > - JMenu is a descendant of AbstractButton - you, by every logic, > should be able to click on buttons and react, shouldn't you? > - You can receive mouse, but not keyboard events > - You cannot determine that JMenu has been chosen, you can only > determine whether it was (de)selected > > Hope this explains the problem and the solution I am searching for in > a better way. So you want action events happening for menu items which are menu containers also, correct? I don't know whether this is possible as the L&F most probably has attached an action listener to these to control the UI, already. I guess you could override it with a proxy to notify you and then invoke the original one, but it would be clumsy in face of dynamic L&F changes. -- Stanimir --- * 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
Detect when menu is chose "wx" <wx@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "wx" <wx@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "wx" <wx@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "wx" <wx@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
Re: Detect when menu is c "Stanimir Stamenkov" <stanimir.stamenkov@THRWHITE.remove-dii-this> - 2011-04-27 15:49 +0000
csiph-web