The following example will explain the JavaScript function in the applet. A, applet source code (tmin_JS.java) // Importationsimport java.awt.Graphics; import java.awt.Event; // LiveConnect ... for JavaScriptimport netscape.javascript.JSObject; public class tmin_JS extends java.applet.Applet { // variables // initialisation de l'appletpublic void init () {// method init ()} // debiner l'AppleTPublic Void Paint (graphics g) {// method Paint () g.drawstring ("Click Here .. . ", 5, 10);} // mouse DownPublic Boolean MouseDown (Event E, INT X, INT Y) {Try {// Create JSObjectJsObject.getWindow (this) .eval (" JavaScript: alert ('Tmin_JS Click " "x =" x "y =" y ")");} catch (exception ex) {// error on create jsobjectshowstatus ("Error Call JavaScript Err =" EX);} Return True;} } Second, pay attention to the place (1) When calling the JavaScipt function, add this line: jsobject.getWindow (this). Eval ("JavaScript: ..."); (2) To put JSObject reference: import netscape .javascript.jsobject; (3) Defining applet When you add "MayScript" tag