hi
i want to move from one applet that is displayed in html to another applet that is also displayed in html how i can do that thanks for help

i do it but i want to create with each applet an html page and when i do is still displaying the same japplet
herer is the code for the first applet that is named NewJApplet1
<!-- ###################################################################### -->
<html>
<head>
<title>Test page for launching the applet via JNLP</title>
</head>
<body>

    <applet code="NewJApplet1" width="1432" height="800">
        <param name="jnlp_href" value="launch.jnlp"/>
    </applet>
    -->
</body>

</html>
and here is the code of the second japplet that is named NewJApplet2
<!-- ###################################################################### -->
<html>
<head>
<title>Test page for launching the applet via JNLP</title>
</head>
<body>

    <applet code="NewJApplet2" width="1432" height="800">
        <param name="jnlp_href" value="launch.jnlp"/>
    </applet>
    -->
</body>

</html>
when i run the second applet i get the first applet html page

Can you explain what you are seeing and what the problem is?
How are you using the showDocument() method? Please post the code that shows how you are using that statement.

You need to make an html page that loads the second applet and reference that page in the showDocument() method.

You should change the <Title in the page that loads the appet so you know which html page is loading.

Edited 4 Years Ago by NormR1

URL url = new URL("file:///F:/pro/dist/launch.html");
getAppletContext().showDocument(url);
here is the statement for loading the next html page but in the 2 html pages i loads the same applet

You need to make an html page that loads the second applet.
When you have that working then you can use it in your program.
There must be something wrong with your html that it does not load the class referenced by the code= attribute, Remove the <param and see what happens.

This article has been dead for over six months. Start a new discussion instead.