Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting a JFrame becoming Inactive

Status
Not open for further replies.

napa1m

Programmer
Jul 24, 2000
39
0
0
TH
Hi,

I was just programming a GUI of my own and it all works, but I was wondering (after seeing the processWindowEvent method) if it is possible to DETECT a JFrame becoming inactive (ie. the user clicking on another window)?

I basically want this window to be always on top and always active (if that's possible) - so any attempts to switch applications would result in this JFrame to hide() then show() again - effectively bringing it back up to the front and making it active again...

So, if anyone has any ideas at all, PLEASE share them - I've been trying just about everything else to do this (continuously hide() and show()-ing the JFrame in a while loop, putting a massive screen coving JFrame behind it with a button that hide() and show()-s the main JFrame, etc). I figure this would be the easiest and best way to do this...

Any help is greatly appreciated,
Hansen Lechler napa1m
hansen@ithsite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top