Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Paint

Posted on 1998-08-17
4
Medium Priority
?
249 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 40 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

916 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