You could open a socket from the applet back to the web server machine and periodically send a message back and forth. Slightly complicated, firewalls may be a problem. Not 100% reliable either; at least in theory the user might e.g. unplug his network wire or press "sleep" on a laptop; the applet will still be running though the socket connection appears dead.
Or you could do a HTTP request from the applet's stop() or destroy() method. This is not entirely reliable; if the user somehow forcefully terminates his web browser destroy() may not be called.
The best way is not to need to know when an applet closes. Applets run on a different computer; there is no 100% reliable way to know from one computer whether some program is running on another.
Unfortunately this approach does not work 100% of the time, it is intermittant at best.
Even non daemon threads are closed down permaturely contrary to the jvm documentation!!!!.
The release notes specify that we cant use a UI component (i.e. a dialog) in close or destroy otherwise IE hangs.
So can someone tell me how to notify the server that the applet has been closed.