code: protected void followDecoratedComponent() {
          if ((anchorLink != null) && (decoratedComponent != null)) {
              if (attachedLayeredPane == null) {
                  // Try to attach to a layered pane
                  attachToLayeredPane();
              }
              followDecoratedComponent(attachedLayeredPane);
          }
      }
docs: Updates the decoration painter with respect to the decorated component.
  <p>
  This method is to be called whenever changes on the decorated component have an impact on the decoration (for
  instance, its size, location, etc.).
  <p>
  This method has been made protected so that it can be easily called from the implementing sub-classes.