Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-27-2007, 12:03 PM
Member
 
Join Date: Aug 2007
Posts: 15
Gajesh Tripathi is on a distinguished road
repaint validate doLayout
Please any one tell me difference between paint/repaint/update, validate/revalidate/invalidate, doLayout/pack method of Component.
Also understanding updateUI!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-27-2007, 07:53 PM
Senior Member
 
Join Date: Jul 2007
Posts: 1,022
hardwired is on a distinguished road
paint is a container method which receives a graphics context and is used to render a container and all of its children
repaint is what we use in event code to ask a component to re-render itself
update: used in AWT drawing to avoid flicker; its use in Swing is not recommended/needed.
validate - container AWT method which we call when any changes have been made that might affect the layout of a container; asks the container to do a new layout of its children
revalidate - (a great) JComponent method with similiar affect to validate
invalidate - used to mark a component that needs to have its layout redone; occasionally used in AWT
doLayout - rarely used unless you are doing some lower-level layout research/work
pack is a top-level container method that will get everything layed out in the minimum space required and ready for display.
updateUI is used only when you need to change/update the look and feel
These methods are all explained in the javadocs.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in repaint Preethi AWT / Swing 16 03-18-2008 09:10 PM
Repaint problem swimberl Java 2D 1 02-16-2008 10:12 PM
Repaint problem swimberl Java 2D 0 01-06-2008 04:28 AM
Repaint fails when using threads rjevans2000 Threads and Synchronization 1 09-22-2007 12:22 AM
Repaint fails when using threads rjevans2000 AWT / Swing 3 08-15-2007 06:42 PM


All times are GMT +3. The time now is 03:24 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org