code: public void setText(String text) {
          // Only change if different
          if (!ValueUtils.areEqual(text, toolTip.getTipText())) {
  
              boolean wasVisible = isVisible();
              if (wasVisible) {
                  setVisible(false);
              }
  
              toolTip.setTipText(text);
  
              if (wasVisible) {
                  setVisible(true);
              }
          }
      }
docs: Sets the text to be displayed as a tooltip.
  
  @param text Text to be displayed