<AWT Dev> <Swing Dev> Review request #3: 6852592 (revalidate() must be smarter)
Peter.Zhelezniakov at Sun.COM
Thu Jul 23 08:34:22 PDT 2009
Christopher Deckers wrote:
> While looking at some of the changes, I saw some existing code which I
> do not really understand: why is JTextField having a special logic in
> isValidateRoot in case it is not in a JViewPort? And if this component
> has a special handling, why not other components?
When a text field is in a viewport, it grows indefinitely as more text
is typed into it, and lets the viewport handle scrolling. A standalone
text field, on the other hand, starts scrolling text once it exceeds
available width, thus acting as a viewport by itself. So invalidation
can safely stop at such text fields -- this is why they are validate roots.
More information about the awt-dev