import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class DisplayPanel extends JPanel
{
	Image image;
	JLabel label;
	
	DisplayPanel(Image x)
	{
		super();
		image = x;
		setSize(image.getWidth(null),image.getHeight(null));
		label = new JLabel (new ImageIcon(image));
		add(label);

	}
	public void displayImage(Image x)
	{
		image = x;
		label.setIcon (new ImageIcon (image));
	}
	
}
