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

Look at the AppletContext class's showDocument() method.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.