code: public void drawMarker(final ToggleButton dragged, final double x, final double y) {
  
          final int draggedIdx = getBox().getChildren().indexOf(dragged);
          final int markerIdx = getBox().getChildren().indexOf(this.marker);
  
          int idx = 0;
          Node tempHoverNode = null;
          final int xx = 0;
          for (final Node n : getBox().getChildren()) {
  
              if (n.getBoundsInParent().contains(x, y)) {
                  tempHoverNode = n;
                  break;
              }
  
              if (n != this.marker) {
                  idx++;
              }
          }
  
          if (tempHoverNode == this.hoverNode) {
              return;
          } else {
              this.hoverNode = tempHoverNode;
          }
  
          System.out.println("marker" + markerIdx + "  idx " + idx);
          if (markerIdx != idx) {
  
              if (this.marker != null) {
                  getBox().getChildren().remove(this.marker);
              }
  
              if (draggedIdx != idx) {
                  this.marker = model().object().orientation() == TabbedPaneOrientation.bottom || model().object().orientation() == TabbedPaneOrientation.top ? new Rectangle(10, getBox().getHeight())
                          : new Rectangle(getBox().getWidth(), 4);
  
                  this.marker.setFill(Color.LIGHTGREEN);
  
                  getBox().getChildren().add(idx, this.marker);
              }
          }
  
      }
docs: Draw marker.
  
  @param x the x
  @param y the y