Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > AWT: Why not call update() directly?

Reply
Thread Tools

AWT: Why not call update() directly?

 
 
Marc Twain
Guest
Posts: n/a
 
      01-13-2004
I know there must be a good reason, but why not call update() directly
since repaint() only schedules a call to it later on?

TIA,

AJ.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      01-13-2004
On 13 Jan 2004 05:37:05 -0800, http://www.velocityreviews.com/forums/(E-Mail Removed) (Marc Twain)
wrote or quoted :

>I know there must be a good reason, but why not call update() directly
>since repaint() only schedules a call to it later on?


Because with repaint, procrastination means you often can avoid the
work, since several repaints can be collapsed into one.

Repaint has a clip region, so it only paints what really needs it.

You have to co-ordinate your painting with the repaints generated by
the user dragging and clicking. Hence the queue.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why we should call Thread.start(),not directly call Thread.run()? junzhang1983@gmail.com Java 5 06-20-2008 03:12 PM
Why :: ? Why not : ? Why not . ? <- less clutter ?!? Skybuck Flying C++ 16 08-25-2007 09:48 PM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
why why why does function not work Horace Nunley ASP .Net 1 09-27-2006 09:52 PM



Advertisments