import java.applet.*;
import java.awt.*;
import java.awt.image.*;

public class main extends Applet {

	final int 			W	 			= 320,
						H 				= 240;	
	Image				img				= null;
	int					pixels[]		= new int[W*H];
	
	public void init()
	{
		this.setBackground(Color.WHITE);
		this.setSize(W,H);
				
		img = this.getImage(this.getCodeBase(),"image.jpg");
		
		PixelGrabber pg = new PixelGrabber(img, 0, 0, W, H, pixels, 0, W);
		try {
		    pg.grabPixels();
		} catch (InterruptedException e) {
		    System.err.println("Interrupted!");
		    return;
		}
	}	
	
	public void paint (Graphics g)
	{
		g.drawImage(img,0,0,this);		
	}
}