This week's book giveaway is in the Other Languages forum. We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line! See this thread for details.
I need a Windows/Java/Swing app that can jump to being top window at the click of a button even when not focused\activated\foreground , iconfied etc in Windows e.g. you hit a special big red button and my applet kicks in regardless of what else your doing.
I've JNI'ed a hook which works fine to get all keyboard events (everything works 100% key event wise) but currently my only way to get the target window to be top window all time time is if I iconfiy / zoom i.e.
This again works for everything but I was hoping to do a more move to front type functionality, if the window is already on screen but perhaps obscured (or partially obscured) move it to the top and do nothing if it is top.
I tried stuff like this but if the window is obscured by another (non swing window) it stays that way (unlike my first attempt above)
(I don't do that much Swing so be gentle)
If this is just not possible, is there a way I can detect that the Window is not obscured i.e. Foreground (that way I can turn off the zoom when not needed :-) ) other than using JNI (which at the moment I'll end up doing :-( )
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5