aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Component Checking If the Applet Window is Minimized Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Component Checking If the Applet Window is Minimized" Watch "Component Checking If the Applet Window is Minimized" New topic
Author

Component Checking If the Applet Window is Minimized

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 568
I want my custom Awt Components (my own class extending awt.Component) running under Applet be able to tell if the browser window is minimized, put in the background (i.e. no longer the active window) or hidden. I tried Component.isShowing() but it seems that it always return true even if I've minimised the browser window or put it into the background. Is there any other methods I can use?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

You can get hold of the "browser frame" using SwingUtilities.getAncestorOfClass:
I think that adding a WindowListener to that should work.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Component Checking If the Applet Window is Minimized
 
Similar Threads
Maximizing Applet window with shortcut key
How to get handle of the window running the applet?
JApplet -- Pls help!!
Need urgent Help - Browser is hanging
How to catch browser minimized event