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

Alexander Potochkin Alexander.Potochkin at Sun.COM
Tue Jul 14 07:55:57 PDT 2009

Hello Anthony

> So may I assume that the silence means agreement?

I see no problems with overridden JComponent.invalidate()

> If there's no objections coming within about a week, then I'm going to 
> make a patch with an overridden JComponent.invalidate() method.

There is no need to wait, please send the patch when it is ready


> -- 
> best regards,
> Anthony
> On 07/08/2009 06:20 PM, Anthony Petrov wrote:
>> 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?

More information about the awt-dev mailing list