Hi
I'm currently implementing a swing GUI which uses a glass pane. My problem
is with the MouseListener:
I intercept the mouse events on the glass pane, and dispatch events to the
underlying components when necessary. I looked at an example in the Sun Java
forum, where they also use a JMenuBar. Here's my problem:
A mouse click on the JMenuBar is recognized as such, as the y-coordinate of
the event is negative. However, when the menu list (JMenu) is displayed, a
click on a menu item is not dispatched to the JMenuBar, as the coordinates
show to the JPanel just below the menu bar.
Does anyone have a solution to this?
Thanks
Simon
Posted to: comp.lang.java.programmer; comp.lang.java.gui
Simon Niederberger - 19 May 2004 07:39 GMT
Here's a Java Forum entry which might help:
http://forum.java.sun.com/thread.jsp?thread=208887&forum=57&message=1431994
> Hi
>
[quoted text clipped - 15 lines]
>
> Posted to: comp.lang.java.programmer; comp.lang.java.gui
ak - 19 May 2004 08:15 GMT
> I'm currently implementing a swing GUI which uses a glass pane. My problem
> is with the MouseListener:
[quoted text clipped - 8 lines]
>
> Does anyone have a solution to this?
see http://www.physci.org/codes/sscce.jsp
--
http://uio.dev.java.net
http://reader.imagero.com