I\'ve got a simple program which atm displays a transparant window with an image on it, which is always on top of other windows. Is it possible to direct input past my app s
You can click through a JFrame
with this code...
AWTUtilities.setWindowOpaque(this, false);
AWTUtilities.setWindowOpacity(this, 0.8f);
I don't think you can do it easily, this because after that your OS has dispatched the mouse click to the Java application you can't dispatch that again back to activate whatever is beneath the Java application.
You could do it easily if everything is inside just one Java application but not with separate environments.
Using JNA's WindowUtils accomplishes this effect on Windows 7 (other systems untested):
JFrame frame = new JFrame();
//...
frame.setAlwaysOnTop(true);
System.setProperty("sun.java2d.noddraw", "true");
WindowUtils.setWindowTransparent(frame, true);
WindowUtils.setWindowAlpha(frame, 0.6f);
Thanks to Nate's comment about setAlwaysOnTop
for making this a more viable option.