Problème fermeture applet
Bonjour,
Petit souci à la fermeture d'une applet : l'applet est lancé par un HTA, ce qui interdit de gérer la fermeture via la gestion de l'événement "window.onunload" en javascipt, comme ce serait le cas si je passais par du simple HTML (d'ailleurs j'ai testé ça fonctionne à merveille dans ce cas). J'ai donc dans l'applet une fonction dont le but est de vérifier si la fenêtre contenant l'applet existe toujours ; dans le cas contraire, le programme ferme proprement les sous-programmes lancés puis se clot.
Code:
1 2 3 4 5 6 7 8
| try { JSObject win = JSObject.getWindow(this);}
catch (Exception e) {
<div style="margin-left:40px">closeSystem();
try { Thread.sleep(3000); }
catch(Exception e2) {
System.out.println("E2 :"+e2);
}
System.exit(0);</div>} |
Problème :
J'obtiens des erreurs (cf. ci après). Ca ne gêne pas la bonne fermeture, si ce n'est que ça ouvre une boite de dialogue qui affiche les erreurs. D'où cela peut il provenir et/ou comment remonter à la source du problème ? Merci d'avance
Citation:
basic: Récepteur de modalités non enregistré
java.lang.NullPointerException: null pData
at sun.awt.windows.WComponentPeer.hide(Native Method)
at java.awt.Component.hide(Unknown Source)
at java.awt.Window.hide(Unknown Source)
at sun.awt.EmbeddedFrame.hide(Unknown Source)
at java.awt.Window$1DisposeAction.run(Unknown Source)
at java.awt.Window.doDispose(Unknown Source)
at java.awt.Window.dispose(Unknown Source)
at sun.plugin.viewer.frame.IExplorerEmbeddedFrame.windowClosed(Unknown Source)
at java.awt.Window.processWindowEvent(Unknown Source)
at java.awt.Window.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
basic: Arrêt de l'applet...
basic: Récepteur de progression supprimé : sun.plugin.util.GrayBoxPainter@1125127
basic: Recherche d'informations...
basic: Libération du chargeur de classes : sun.plugin.ClassLoaderInfo@72ffb, refcount=0
basic: Mise en cache du chargeur de classes : sun.plugin.ClassLoaderInfo@72ffb
basic: Taille de cache du chargeur de classes courant : 1
basic: Terminé...
basic: Jonction du thread d'applet...