View Single Post
  #2 (permalink)  
Old 10-27-2007, 07:53 PM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,189
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.
Reply With Quote