It looks like the Common DOM API is what you need. Essentially, you are requesting a DOMService to call you back to the main UI thread when it is good and ready.
http://docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/java_js.html
As I understand it, JSObject is the "old way", and the Common DOM API is the newer one (since Java 6). What you need to do is call the method of your applet and pass the object to the function you want to call back. Then your applet calls this function object from your DOMAction.
, , , Java. NPAPI, ++, JS ++, , , ++ JS. ", .