Control a Java Applet


The Java applet below displays text in a large font. You can enter new text to display in the form below, and JavaScript will call the Java applet to change the text.


End of page.

 

  • Source

    <HTML>
    <HEAD>
    <TITLE>Control a Java Applet</TITLE>
    </HEAD>
    <BODY>
    <H1>Control a Java Applet</H1>
    <HR>
    The Java applet below displays text in a large font. You can enter
    new text to display in the form below, and JavaScript will call the
    Java applet to change the text.
    <HR>
    <FORM NAME="form1">
    <INPUT TYPE="TEXT" NAME="text1">
    <INPUT TYPE="BUTTON" VALUE="Change Text"
    onClick="document.ControlJava.SetMessage(document.form1.text1.value);">
    </FORM>
    <HR>
    <APPLET NAME="ControlJava" CODE="ControlJava.class" WIDTH=450 HEIGHT=125>
    </APPLET>
    <HR>
    End of page.
    </BODY>
    </HTML>