e557. 在Applet中显示图片

See also e551 精简的Applet.

    Image image;
    public void init() {
        // Load image
        image = getImage(getDocumentBase(), "http://hostname/image.gif");
    }
    public void paint(Graphics g) {
        // Draw image
        g.drawImage(image, 0, 0, this);
    }

 

Related Examples
posted @ 2018-09-02 21:08  borter  阅读(143)  评论(0编辑  收藏  举报