FileDocCategorySizeDatePackage
ImagePanel.javaAPI DocExample575Mon Jan 09 11:01:58 GMT 2006None

ImagePanel

public class ImagePanel extends JPanel

Fields Summary
private Image
img
Constructors Summary
public ImagePanel(String img)

        this(new ImageIcon(img).getImage());
    
public ImagePanel(Image img)

        this.img = img;
        Dimension size = new Dimension(img.getWidth(null),img.getHeight(null));
        setPreferredSize(size);
        setMinimumSize(size);
        setMaximumSize(size);
        setSize(size);
        setLayout(null);
    
Methods Summary
public voidpaintComponent(java.awt.Graphics g)

        g.drawImage(img,0,0,null);