Solved

Paint

Posted on 1998-08-17
4
241 Views
Last Modified: 2010-03-30
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
0
Comment
Question by:andrewyu
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
yoren earned 10 total points
ID: 1220129
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
 

Author Comment

by:andrewyu
ID: 1220130
Does it look like the "Refresh" in Windows ?

Anyway, thank you very much !

Andrew
0
 
LVL 7

Expert Comment

by:yoren
ID: 1220131
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
 

Author Comment

by:andrewyu
ID: 1220132
Thank you very much !
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now