This very simple code shows function paint will be executed twice, why?
import java.applet.*;
import java.awt.*;
public class TestClass extends Applet{
int k=0;
public void paint(Graphics g){
g.drawString(Integer.toString(++k),50,20);
}
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.