Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35582

Re: Why must look and feel wipe out my mouse events?

Newsgroups comp.lang.java.programmer
Date 2016-09-09 11:46 -0700
References <b832ea9e-f255-4fa9-95ff-e8a57a86f988@googlegroups.com> <3ef9903c-46a5-4779-bb74-7b65c9694a11@googlegroups.com>
Message-ID <72a246c3-4c5c-4c73-aa57-73eafe141fb6@googlegroups.com> (permalink)
Subject Re: Why must look and feel wipe out my mouse events?
From Eric Douglas <e.d.programmer@gmail.com>

Show all headers | View raw


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


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