Applet: getImage(URL url, String name) : Applet : java.applet : Java by API examples (example source code) Organized by topic

Java by API
C++
Java by API Home »  java.applet   » [  Applet  ]   
 



Applet: getImage(URL url, String name)

import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Image;

public class ImageApplet extends Applet {
  Image im;

  public void init() {
    im = getImage(getDocumentBase()"image.jpg");
  }

  public void paint(Graphics g) {
    g.drawImage(im, 00this);
  }
}

           
       
Related examples in the same category
1.  Applet: getDocumentBase()
2.  Applet: newAudioClip(URL audioFileURL)








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.