code: private void updateToolTipDialogVisibility() {
          // Determine whether tooltip should be/remain visible
          boolean shouldBeVisible = isOverDecorationPainter() || isOverToolTipDialog();
  
          // Create tooltip dialog if needed
          if (shouldBeVisible) {
              createToolTipDialogIfNeeded();
          }
  
          // Update tooltip dialog visibility if changed
          if ((toolTipDialog != null) && (toolTipDialog.isVisible() != shouldBeVisible)) {
              toolTipDialog.setVisible(shouldBeVisible);
          }
      }
docs: Updates the visibility of the tooltip dialog according to the mouse pointer location, the visibility of the
  decoration painter and the bounds of the decoration painter.
  
  @see AbstractComponentDecoration#updateDecorationPainterVisibility()