@Override
  protected void paintComponent(Graphics g) {
    Color bgColor = getTabColor();
    if (bgColor != null) {
      int borderThickness = JBUIScale.scale(1);
      Dimension size = getSize();
      Rectangle rect = new Rectangle(0, borderThickness, size.width, size.height - 2 * borderThickness);
      GraphicsExKt.fill2DRect((Graphics2D)g, rect, bgColor);
    }
    super.paintComponent(g);
  }
@Override
  protected void paintComponent(Graphics g)