Originally posted by Nathan Pruett:
You can use "this" in the drawImage call... Panel implements ImageObserver...
-Nate
Yes yes yes ... sorry about the confusion in my last email, Panel implements ImageObserver

, but why is my code below doesn't work :
<code>
import java.awt.*;
public class MyPanel extends Panel {
Image img;
public MyPanel(){
img = Toolkit.getDefaultToolkit().getImage("myimg.jpg");
}
public void paint(Graphics g){
g.drawImage(1,1,img,this);
}
}
</code>
I got compilation error : method drawImage(int,int,java.awt.Image,MyPanel) not found in class java.awt.Graphics.
Is there anything wrong ?
Big Thanks,
Roy