• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Window to top

 
Ranch Hand
Posts: 443
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 :-( )
 
Space pants. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic