Where Main is the name of your main class:
static final String turret1URL = "/sprites/turret1.png";
URL url = Main.class.getResource(turret1URL);
ImageIcon xi = new ImageIcon(url);
Image turret1Image = xi.getImage();
public void paint(Graphics g) {
int x=10,y=10;
g.drawImage(turrent1Image,x,y,null);
}
http://www.java-gaming.org/cgi-bin/JGOForums/YaBB.cgi?board=share;action=display;num=1036252001http://www.java-gaming.org/cgi-bin/JGOForums/YaBB.cgi?board=Announcements;action=display;num=1042134093If you don't mind using someone elses library look at
http://www.scottshaver2000.com under the libraries section look at Planetation. Tiles, sprites, map editor, sound, client/server, etc.
Can also find information in
http://www.scottshaver2000.com/forum