<Swing Dev> <AWT Dev> Lw/Hw mixing vs revalidate()/validate()/invalidate()

Anthony Petrov Anthony.Petrov at Sun.COM
Wed Jul 8 14:20:57 UTC 2009


Just to revive the discussion...

On 06/20/2009 05:52 PM, Christopher Deckers wrote:
> 2. Make it so that revalidate does not mark the ancestors of the
> validate root invalid. I wonder if this is a sensible approach though.
I guess you mean an overridden JComponent.invalidate() here, since 
revalidate() calls this method to invalidate the component hierarchy.

As we understand from the previous discussions, the root problem is 
indeed the AWT's invalidate() method that goes too far doing its job. 
Since Swing introduces the concept of "validate root", it seems really 
natural to me to override the JComponent.invalidate() method 
accordingly. At least I can't imagine a problem caused by choosing this way.

What do Swing people think about that?

--
best regards,
Anthony



More information about the swing-dev mailing list