try {
String file = getParameter ("file");
if (file != null) {
URL imageurl = new URL (getDocumentBase(), file);
InputStream is = imageurl.openStream();
PPMImageDecoder ppm = new PPMImageDecoder ();
ppm.readImage (is);
image = createImage (ppm);
repaint();
}
} catch (MalformedURLException me) {
System.out.println ("Bad URL");
} catch (IOException io) {
System.out.println ("Bad File");
}