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

BasicTreeUI focusLost() calls focusGained()

XMLWordPrintable

    • b53
    • generic
    • generic

      BasicTreeUI has behavior which is common to both the focusLost and focusGained methods. Instead of placing this code in a separate method it was instead placed in focusGained and focusLost calls focusGained. This causes a problem with subclassing. In my UI subclass if I register my own focus listener but still want to use the superclasses implementation I can't. This is because if I call super.focusLost() it ends up calling my focusGained().

      This common code in BasicTreeUI should be put in a separate method and the handlers should call that.

            svioletsunw Scott Violet (Inactive)
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: