AWT: Why not call update() directly?

Discussion in 'Java' started by Marc Twain, Jan 13, 2004.

  1. Marc Twain

    Marc Twain Guest

    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.
    Marc Twain, Jan 13, 2004
    #1
    1. Advertising

  2. Marc Twain

    Roedy Green Guest

    On 13 Jan 2004 05:37:05 -0800, (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.
    Roedy Green, Jan 13, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Mark Bram
    Replies:
    2
    Views:
    5,938
    Robert Mark Bram
    Dec 11, 2003
  2. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    853
    Mark Rae
    Dec 21, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,739
    Smokey Grindel
    Dec 2, 2006
  4. Replies:
    5
    Views:
    1,589
    Roedy Green
    Jun 20, 2008
  5. Replies:
    2
    Views:
    112
Loading...

Share This Page