SwingUtilities.findFocusOwner( Component ) should have equivalent replacement

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P5
    • None
    • Affects Version/s: 1.4.2
    • Component/s: client-libs



      Name: wm7046 Date: 04/13/2004


      SwingUtilities.findFocusOwner(Component c) has been deprecated. However the replacement method KeyBoardFocusManager.getFocusOwner() is not completely equivalent. If you want to find out whether a component contains the currently focused component without using findFocusOwner you have to duplicate all its code.

      For example, I want to find out whether component z contains focus:

      boolean containsFocus = findFocus(z) != null;

      A suitable alternative would be a method:

      public boolean containsFocus(Component c);
      (Incident Review ID: 244211)
      ======================================================================

            Assignee:
            Alexander Potochkin (Inactive)
            Reporter:
            Marvin Ma (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: