FileDocCategorySizeDatePackage
ImageDisplayer.javaAPI DocExample1504Tue Dec 12 18:59:04 GMT 2000None

ImageDisplayer

public class ImageDisplayer extends JApplet

Fields Summary
static String
imageFile
Constructors Summary
Methods Summary
public voidinit()


       
        Image image = getImage(getCodeBase(), imageFile);
        ImagePanel imagePanel = new ImagePanel(image);
        getContentPane().add(imagePanel, BorderLayout.CENTER);
    
public static voidmain(java.lang.String[] args)

        Image image = Toolkit.getDefaultToolkit().getImage(
                                        ImageDisplayer.imageFile);
        ImagePanel imagePanel = new ImagePanel(image);

        JFrame f = new JFrame("ImageDisplayer");
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

        f.getContentPane().add(imagePanel, BorderLayout.CENTER);
        f.setSize(new Dimension(550,100));
        f.setVisible(true);