moving an image
I am trying to move an image.
But it only moves one Pixel at the beginning, when I click on the image.
What could I do?
Is there a function that is called every Screen-Sync or something like that?
import java.applet.*;
import java.awt.*;
publicclass meinBildextends Applet{
Image EricsBild;
int x,y;
publicvoid init(){
EricsBild = getImage(getCodeBase(),"lippen.jpg");
x=5;y=5;
}
publicvoid paint(Graphics g){
if (x<200) x++;
if (x>200) x--;
if (y<200) y++;
g.drawImage(EricsBild,x,y,this);
}
}

