The moose likes Swing / AWT / SWT and the fly likes when to use repaint ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "when to use repaint ?" Watch "when to use repaint ?" New topic
Author

when to use repaint ?

SUDA VIJAYA KUMAR
Ranch Hand

Joined: Sep 26, 2001
Posts: 40
Hi,
Could you please tell me the basic difference between repaint and update in applets.I am little bit confused in understanding the diff. between them.
Pl.hlp
Regards
vijay
SUDA VIJAYA KUMAR
Ranch Hand

Joined: Sep 26, 2001
Posts: 40
Hi all,
Can anybody please reply to my query.
I required it urgently
Thanks inadvance
vijay
Originally posted by SUDA VIJAYA KUMAR:
Hi,
Could you please tell me the basic difference between repaint and update in applets.I am little bit confused in understanding the diff. between them.
Pl.hlp
Regards
vijay

Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Always override update( Graphics g ), but always call repaint(). Repaint has code in it that figures out the graphics context to send to update.

-Nate
[This message has been edited by Nathan Pruett (edited November 13, 2001).]


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: when to use repaint ?
 
Similar Threads
confused...
Header table
update and repaint
update,paint,repaint
repaint and update