Solved

Paint

Posted on 1998-08-17
4
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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 This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

734 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