I am trying to write an applet in Java that checks if it is displayed on the screen. There are several ways to check if Java wants to show the applet or certain components (i.e. .isShowing() or .isVisible() ), but none of them checks if the application is really displayed on the screen.
Say you launch the applet in Tab A of your favorite browser. When you go to Tab B, the applet no longer appears, but it still works (applet.stop () will not be called in this case). Or, when you have a page with an applet, but move it before it. I need to check if the applet is really visible to the user, and not hidden by anything else (for example, behind another application).
I think there is no easy way in java to do this since I have been looking for the last two days for it;) Can someone tell me some way to achieve this? Your help would be greatly appreciated.
source share