code: public static void setOpaque (JComponent comp, final boolean opaque)
      {
          applyToHierarchy(comp, new ComponentOp() {
              public void apply (Component comp) {
                  if (comp instanceof JComponent) {
                      ((JComponent) comp).setOpaque(opaque);
                  }
              }
          });
      }
docs: Set the opacity on the specified component, <em>and all of its children.</em>