Mouse events are going "through" my JPanel in a JLayeredPane
804030Dec 5 2010 — edited Dec 6 2010Hello,
I use the JLayeredPane of a JFrame to show a JPanel "on top" of the normal View of my window. In that "popup" Panel I have some buttons - this works fine, but with one drawback:
When I don't click on a button on my "popup panel" but on the panel itself, the mouse click events are going through that panel to the normal JPanel of my JFrame, maybe pressing buttons behind it. So, my Popup-JPanel, which is on top of my normal JPanel/JFrame, does not catch/consume mouse events.
Do you have any idea how to stop mouse events to go through my popup-panel to the window/panel behind it?
Thanks a lot for your help!