<AWT Dev> <Swing Dev> Regarding the fix for 6852592 (revalidate() must be smarter)
Peter.Zhelezniakov at Sun.COM
Wed Aug 12 06:39:50 PDT 2009
Anthony Petrov wrote:
> Possible solutions include:
> 1. Adding a call to revalidate() method immediately after the components
> have been added to the container in the test code. However, from Swing
> perspective this looks like a backward incompatibility.
> 2. Overriding the JComponent.addImpl() method and putting the call to
> revalidate() there. This, however, may introduce some performance
I like #2. Adding children to a container does indeed affect the
container's layout, so it's reasonable to call revalidate().
Peter | x33066 | location: SPB04 | timezone: GMT+03
More information about the awt-dev