Using the URL class Using the URL class import java.net. The applet imports the java.net package. A URL is constructed from a String. A compilation error will be flagged if this is not done. In this case the catch block does nothing if an exception is generated.
Every applet executes in a browser.
The browser is represented by an object of class AppletContext. This method accepts an object of type URL, fetches the web page which it refers to and displays it in the browser. The effect of this program is to replace itself within the browser with the SCIT server home page. It is an example of a badly behaved applet as it effectively disables the browser's BACK button. It will work from a Java 1.1 enabled browser.