code: public void installUI(JComponent c) {
          super.installUI(c);
  
          root = (JRootPane) c;
  
          updateTextured();
  
          int       style  = root.getWindowDecorationStyle();
          Container parent = root.getParent();
  
          if (parent != null && (parent instanceof JFrame || parent instanceof JDialog) && style != JRootPane.NONE) {
              installClientDecorations(root);
          }
      }
docs: Invokes supers implementation of <code>installUI</code> to install the
  necessary state onto the passed in <code>JRootPane</code> to render the
  metal look and feel implementation of <code>RootPaneUI</code>. If the
  <code>windowDecorationStyle</code> property of the <code>JRootPane</code>
  is other than <code>JRootPane.NONE</code>, this will add a custom <code>
  Component</code> to render the widgets to <code>JRootPane</code>, as well
  as installing a custom <code>Border</code> and <code>LayoutManager</code>
  on the <code>JRootPane</code>.
  
  @param c the JRootPane to install state onto.