code: private void updateDecorationPainterVisibility() {
          boolean shouldBeVisible = (decoratedComponent != null) && //
                  (paintWhenDisabled || decoratedComponent.isEnabled()) && //
                  decoratedComponent.isShowing() && //
                  visible;
          if (shouldBeVisible != decorationPainter.isVisible()) {
              decorationPainter.setVisible(shouldBeVisible);
          }
      }
docs: Updates the visibility of the decoration painter according to the visible state set by the programmer and the
  state of the decorated component.
  
  @see DecorationPainter