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

Component.nextFocusHelper should search for first visible focus cycle root ancst

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • beta3
    • sparc
    • solaris_7

      If you hide a focus cycle root with a child that has focus, focus will be lost. I believe this is happening because nextFocusHelper only looks at the first focus cycle root ancestor, which at this point will not be visible. I've attached a test case of this. The frame contains a button and a text field. The text field is in a jpanel that has is a focus cycle root. If you click in the text field, then click the button, setVisible(false) will be invoked on the panel. At this point you'll see that null is printed out to the console every second (the null is a result of asking the KeyboardFocusManager for its current focus owner).

            son Oleg Sukhodolsky (Inactive)
            svioletsunw Scott Violet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: