else { if (isRootPaneCheckingEnabled()) throw new Error("Do not add directly to JDialog." + " Use getContentPane().add instead."); getContentPane().add(comp, constraints, index); }
    protected  void addImpl(Component comp, Object constraints, int index)  {    if (isRootPaneCheckingEnabled())      throw new Error("rootPaneChecking is enabled - adding components disallowed.");    super.addImpl(comp, constraints, index);  }