To mark a Component or Container (and its containing parents, but not the contained children) as needing to be re-laid out soon usually because the Component (or one of its children) has resized, become visible or become invisible. Sometimes application code directly calls invalidate(). More often invalidate() gets called as a side effect of adding or deleting a Component, making a Component visible or invisible, changing the size or location of a Component with setSize(), setLocation() or setBounds(). The AWT (Advanced Windowing Toolkit) is smart enough not to invalidate if you setVisible( true ) when the Component is already visible.
If the value of a Component changes, but not the size or position of where it is displayed on the screen, there is no need to invalidate, just repaint that Component. invalidate() is also called as the first step in processing a COMPONENT_RESIZED event. Invoking invalidate by itself will not schedule a validate or repaint.
This page is posted |
http://mindprod.com/jgloss/invalidate.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\invalidate.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.144.119.192] |
| |
Feedback |
You are visitor number | |