Results 1 to 2 of 2
Thread: repaint validate doLayout
- 10-27-2007, 11:03 AM #1
Member
- Join Date
- Aug 2007
- Posts
- 40
- Rep Power
- 0
- 10-27-2007, 06:53 PM #2
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.
Similar Threads
-
Problem in repaint
By Preethi in forum AWT / SwingReplies: 16Last Post: 03-18-2008, 08:10 PM -
Repaint problem
By swimberl in forum Java 2DReplies: 1Last Post: 02-16-2008, 09:12 PM -
Repaint problem
By swimberl in forum Java 2DReplies: 0Last Post: 01-06-2008, 03:28 AM -
Repaint fails when using threads
By rjevans2000 in forum Threads and SynchronizationReplies: 1Last Post: 09-21-2007, 11:22 PM -
Repaint fails when using threads
By rjevans2000 in forum AWT / SwingReplies: 3Last Post: 08-15-2007, 05:42 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks