Basic HTML version of Foils prepared May 12 1996

Foil 126 Accessing URL's in Java -- URL, showDocument

From CRPC Lectures on Java Language Applets Graphics CRPC Annual Meeting Tutorial -- May 14,1996. by Geoffrey C. Fox


1 First you set the URL in various ways using something like
2 String npacurl = "http://www.npac.syr.edu/index.html";
3 try { theinputurl = new URL(npacurl); } // URL class is in java.net
4 catch ( MalformedURLException e) {
  • System.out.println("Bad URL: " + npacurl); }
5 where you are meant to test to see if URL is legal!
6 The simplest thing to do now is to see this page with
7 getAppletContext().showDocument(theinputurl, Frame targetdisplayframe);

in Table To:


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Dec 14 1997