@Override
    public void paintBorder(@NotNull Component c, @NotNull Graphics g, int x, int y, int width, int height) {
      if (isEmptyVisible()) return;

      if ((sideMask & SideBorder.LEFT) != 0) {
        getTabPainter().paintBorderLine((Graphics2D)g, getBorderThickness(), new Point(x, y), new Point(x, y + height));
      }

      getTabPainter()
        .paintBorderLine((Graphics2D)g, getBorderThickness(), new Point(x, y + Objects.requireNonNull(getHeaderFitSize()).height),
                         new Point(x + width, y + getHeaderFitSize().height));
    }
@Override
    public void paintBorder(@NotNull Component c, @NotNull Graphics g, int x, int y, int width, int height)