protected boolean isInPopup(Component src) {
      for (Component c = src; c != null; c = c.getParent()) {
        if (c == contents) {
          return true;
        } else if (c instanceof java.applet.Applet || c instanceof Window) {
          return false;
        }
      }
      return false;
    }