<Swing Dev> <AWT Dev> Review request #3: 6852592 (revalidate() must be smarter)

Anthony Petrov Anthony.Petrov at Sun.COM
Thu Jul 30 11:33:24 UTC 2009


On 07/23/2009 06:54 PM, Artem Ananiev wrote:
> This looks like a good idea.
>> And what about the AWT ScrollPane? Shouldn't it return true as well?
> 
> As well as this one.

Legacy AWT applications are supposed to invoke the validate() method on 
the top-level component. After the proposed change the invalidate() will 
stop invalidation on the scroll pane, making the subsequent validate() 
call a no-op because the top-level component will remain valid.

Not only is the change backward-incompatible, but it also tends to leave 
parts of the component hierarchy invalid. That wasn't important before, 
but is important now (and that is the aim of this particular fix, by the 
way.)

Since:

a) almost nobody develops pure AWT applications our days, thus making 
this change unimportant,
b) this change breaks backward compatibility with existing applications,

I'm against making the AWT ScrollPane a validate root. Please provide 
more justification if you strongly feel it is required.

--
best regards,
Anthony

>>> http://cr.openjdk.java.net/~anthony/7-23-invalidate-6852592.2/



More information about the swing-dev mailing list