Java Tutorial

 
 
 
 
/* <applet code=\"showDemo\" height=300 width=300> </applet> */

import java.awt.*;
import java.applet.*;
import java.net.*;

public class showDemo extends Applet
{
     public void start() {
        AppletContext ac = getAppletContext();
        URL url = getCodeBase();

        try{
                ac.showDocument(new URL(url + \"Test.html\"));
        }catch(MalformedURLException e){
                showStatus(\"URL not Found \");
        }
    }
}

 
 
Didn't find what you were looking for? Find more on An applet program of showing new document using showDocument(URL) method