Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35585
| From | j4n bur53 <janburse@fastmail.fm> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Why must look and feel wipe out my mouse events? |
| Date | 2016-09-10 15:27 +0200 |
| Organization | albasani.net |
| Message-ID | <nr11nn$6f9$1@news.albasani.net> (permalink) |
| References | <b832ea9e-f255-4fa9-95ff-e8a57a86f988@googlegroups.com> <3ef9903c-46a5-4779-bb74-7b65c9694a11@googlegroups.com> <72a246c3-4c5c-4c73-aa57-73eafe141fb6@googlegroups.com> |
If your is over the nuclear war start button,
and click it beacause you only want to close
a popup, its better the event doesnt permeate.
Eric Douglas schrieb:
> On Friday, September 9, 2016 at 2:10:05 PM UTC-4, Eric Douglas wrote:
>>
>> I tested this with all the values of getInstalledLookAndFeels(). Metal does register those mouse click events. Nimbus, Motif, Windows, and Windows Classic do not.
>
> Aha, seems dumb it won't tell the JTree you clicked on it if the popup window is visible but I found the workaround.
> http://stackoverflow.com/questions/23505541/swing-mouse-click-event-for-jmenu-and-jpopupmenu
>
> Adding that line makes it register.
> UIManager.put("PopupMenu.consumeEventOnClose", false);
>
> Now, as the fix sounds like a hack, is there any reason I wouldn't want it not consuming an event, and is there any chance something else in the application needs it to consume...
>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why must look and feel wipe out my mouse events? Eric Douglas <e.d.programmer@gmail.com> - 2016-09-09 10:38 -0700
Re: Why must look and feel wipe out my mouse events? Eric Douglas <e.d.programmer@gmail.com> - 2016-09-09 11:09 -0700
Re: Why must look and feel wipe out my mouse events? Eric Douglas <e.d.programmer@gmail.com> - 2016-09-09 11:46 -0700
Re: Why must look and feel wipe out my mouse events? j4n bur53 <janburse@fastmail.fm> - 2016-09-10 15:27 +0200
Re: Why must look and feel wipe out my mouse events? Andreas Leitgeb <avl@logic.at> - 2016-09-10 14:06 +0000
Re: Why must look and feel wipe out my mouse events? j4n bur53 <janburse@fastmail.fm> - 2016-09-11 00:14 +0200
csiph-web