public class ShowDocument_AppletContext extends Applet implements ActionListener { public void init() { Button button = new Button("Go To Html Page");
button.addActionListener(this);
add(button); }
public void actionPerformed(ActionEvent ae) { try { URL url = new URL(getDocumentBase(), "HtmlExample.html");
getAppletContext().showDocument(url); } catch (MalformedURLException e) { showStatus("URL not found"); }
}
}