Paint

In the java.applet.Applet class, there is a method call Paint, but, when will it be called ? During the the first time the applet shown or every time it redrawn ?

thanks,
Andrew
andrewyuAsked:
Who is Participating?
 
yorenConnect With a Mentor Commented:
Every time the browser needs to redraw your applet. Put a debug line like the following:

System.out.println("Some message");

in your paint method and then check out your browser's Java Console.
0
 
andrewyuAuthor Commented:
Does it look like the "Refresh" in Windows ?

Anyway, thank you very much !

Andrew
0
 
yorenCommented:
I can't remember the exact Windows call it's like, but the concept is very similar: they're both event-driven routines that update the display when needed.
0
 
andrewyuAuthor Commented:
Thank you very much !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.