Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7036669

Simplify revalidating component hierarchy with multiple validate roots

XMLWordPrintable

    • b142
    • generic
    • generic
    • Verified

      6907705 reveals a failing JCK test. The JTextField.setColumns() method doesn't update the JTextField size.

      After discussing this issue with Swing and AWT teams, it is clear that a fix for 6852592 is slightly incomplete. The fix introduces 'validate roots' concept in AWT - containers on which the invalidate() operation stops. However, it doesn't provide a way for the developer to quickly identify a validate root, so that a subsequent validate() method call could be performed on the correct component (i.e. the nearest validate root).

      Swing already has a method JComponent.revalidate() which does just that. And 6907705 could be fixed by calling revalidate() on the parent of the JTextField. However, since JComponent.getContainer() returns a Container, and the JTextField could be placed in a non-Swing container, we can't simply use the revalidate() Swing machinery.

      This RFE proposes to implement the Component.revalidate() method.

            anthony Anthony Petrov (Inactive)
            anthony Anthony Petrov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: