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 bmpFileApplet extends Applet
{
        Vector ImageVector;
        Image image;
        Image imageBuffer;                  
        Graphics gBuf;              
        Enumeration ImageInfo;
        bmpImage bmp = null;
        int pixels[]; // array of pixels

       InputStream is = null;
       URL url = null;

	public void init()
	{
                ImageVector = new Vector();
                java.lang.String s = getParameter("href");
                showStatus("Retrieving Metafile" );

		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;
		}


                  bmp = new bmpImage(is);
                  add(bmp);  // adding will display the image
//                  image = bmp.getImage();


	}

        public void paint(Graphics g){
//              g.drawImage(image, 0, 0, this);
       }
       

}
