I change a picture on a button click event like this :
//i have in the init method, the button and the two pictures definitions.
//in fact, the second picture is a pixelGrabbing of the first image with
more luminosity.
public void paint(Graphics g)
{
g.drawImage(img,10,30,this);
}
public void actionPerformed(ActionEvent e)
{
showStatus("ok");
getGraphics().drawImage(img2,10,30,this);
}
But, in this code, when i'm running my applet, i have to click two times in
order to see the new picture.
do i make an error somewhere?