hey there,
It's a simple beginner question:
why is there no image on my panel?
I can draw and so on, but it displays no pic, why?
any help is greatly appreciated!
stonee
public class Frame0001 extends JFrame {
public Frame0001() {
}
public static void main(String[] args) {
Frame0001 frame0001 = new Frame0001();
frame0001.setSize(200,200);
frame0001.show();
}
public void paint (Graphics g)
{
Image img;
img = getToolkit().createImage("Image40.gif"
g.drawImage(img,100,100,null);
}
}
It's a simple beginner question:
why is there no image on my panel?
I can draw and so on, but it displays no pic, why?
any help is greatly appreciated!
stonee
public class Frame0001 extends JFrame {
public Frame0001() {
}
public static void main(String[] args) {
Frame0001 frame0001 = new Frame0001();
frame0001.setSize(200,200);
frame0001.show();
}
public void paint (Graphics g)
{
Image img;
img = getToolkit().createImage("Image40.gif"
g.drawImage(img,100,100,null);
}
}