code: protected boolean isOverCloseButton(int x, int y) {
          if (tabCloseButtonPlacement != CENTER) {
              int tabCount = tabPane.getTabCount();
  
              for (int i = 0; i < tabCount; i++) {
                  if (getCloseButtonBounds(i).contains(x, y)) {
                      closeButtonHoverIndex = i;
                      return true;
                  }
              }
          }
  
          closeButtonHoverIndex = -1;
          return false;
      }
docs: Determine whether the mouse is over a tab close button, and if so, set
  the hover index.
  
  @param  x the current mouse x coordinate.
  @param  y the current mouse y coordinate.
  
  @return {@code true} if the mouse is over a close button, {@code false}
  otherwise.