docs: private static Window getWindowAncestor(JTextComponent component) {
          if (component == null) {
              return null;
          }
          return SwingUtilities.getWindowAncestor(component);
      }