static @Nullable Component getCurrentFocusComponent() {
    final KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
    Component focusOwner = focusManager.getFocusOwner();
    if (focusOwner == null) {
      focusOwner = focusManager.getPermanentFocusOwner();
    }
    if (focusOwner == null) {
      return focusManager.getFocusedWindow();
    }
    return focusOwner;
  }
static @Nullable Component getCurrentFocusComponent()