How to click through JGlassPane With MouseListener to UI behind it
- by Epicmaster
I have a JFrame and a bunch of JComponents on top of the JFrame.
I need to make use of the JGlassPane and I used this implementation to set it up.
JPanel glass = new JPanel();
frame.setGlassPane(glass);
glass.setVisible(true);
glass.setOpaque(false);
After doing so I can't select any JButtons or other JComponents under the JGlassPane.
Is there a way to have only the components on the GlassPane selectable while still having the ability to select components under the GlassPane?
Edit I forgot to mention (not knowing this would be relevant) that I did attach both a MouseListener and a MouseMotionListener to the glass pane. Is there a way to pass the Mouse Events to other components and only use them when needed?