How can I load a particular HTML page from within an applet?
Applets are executed within a web browser, and there's an easy way to load show a specific URL.
The following code snippet shows you how this can be done.
import java.net.*; import java.awt.*; import java.applet.*; public class MyApplet extends Applet { // Your applet code goes here // Show me a page public void showPage ( String mypage ) { URL myurl = null; // Create a URL object try { myurl = new URL ( mypage ); } catch (MalformedURLException e) { // Invalid URL } // Show URL if (myurl != null) { getAppletContext().showDocument (myurl); } } }