DelphiFAQ Home Search:
General :: Programming :: Java :: Applets


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

How do you open a URL from an applet?


How do you open a URL from an applet?


By using the method showDocument(URL) see the example below. This code will load the file test.html from the same directory where the applet is situated on the server and if the file is not found display error message on the status bar.

URL url = getCodeBase(); // get url of the applet
 try {
   getAppletContext().showDocument (new URL(url+"test.html"));
  catch(MalformedURLException e) {
   showStatus("URL not found");

Generated 20:01:32 on May 31, 2020