I often hear people asking on how to put an image on Java applications, thus here is an example of a painted panel that has an image in the same directory as the application *note* you cant use windows bmp with Java, but once you start creating your own images it's a good time to note that their are many "free image converters" available. Code: import java.awt.*; import javax.swing.*; public class PaintPanel extends JFrame { public PaintPanel() { super("painted panel example"); setSize(640, 400); setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); //create frame Container contentArea = getContentPane(); //create container CustomPanel panel = new CustomPanel(); contentArea.add(panel); setContentPane(contentArea); //add components } class CustomPanel extends JPanel { public void paintComponent (Graphics painter) { Image pic = Toolkit.getDefaultToolkit().getImage("gui1.gif"); if(pic != null) painter.drawImage(pic, 15, 5, this); //create image } } public static void main(String [] args) {PaintPanel eg = new PaintPanel();} } Hope i've helped.
Guys, i've just checked over the code, compiled and run it on three different machines so it works fine.