import java.io.*;
import java.util.*;
import java.awt.*;
import java.net.*;
import java.applet.Applet;
import java.lang.Math;
import java.lang.String;
import java.awt.image.*;


public class wmfapplet4 extends Applet
{
        Vector ImageVector;
	Image image = null;
        wmfImage wmf = null;
        Image imageBuffer;                  
        Graphics gBuf;              
        Enumeration ImageInfo;

        InputStream is = null;
        URL url = null;

	public void init()
	{
                ImageVector = new Vector();
		String s = getParameter("href");
                try {
			url = new URL(getCodeBase(), s);
                }  catch (MalformedURLException ex){
			showStatus("Improper URL: " + s);
			return;
		}
                try {
			is = url.openStream();
                }  catch (IOException ex){
			showStatus("Error opening connection to " + s);
			return;
		}

               try
               {
                  Dimension d = size();
                  wmf = new wmfImage(is, d.width, d.height);
                  add(wmf);
                     
                }
                catch (IOException ex)
                {
                        System.out.println("io");
                        return;
                }


                catch (Exception ex)
                {
                        System.out.println("ex");
                        return;
                }
                
	}

        public void paint(Graphics g){
        }


}
