@Override
  public void paint(Graphics g, JComponent c) {
    Container parent = c.getParent();
    if (c.isOpaque() && parent != null) {
      g.setColor(parent.getBackground());
      g.fillRect(0, 0, c.getWidth(), c.getHeight());
    }

    Insets i = c.getInsets();
    int x = c.getWidth() - DEFAULT_ICON.getIconWidth() - i.right;

    if (c instanceof JSpinner) {
      Graphics2D g2 = (Graphics2D)g;
      g2.setColor(getBackground());

      float arc = JBUIScale.scale(6f);
      Path2D rect = new Path2D.Float(Path2D.WIND_EVEN_ODD);
      rect.moveTo(x, i.top);
      rect.lineTo(x, c.getHeight() - i.bottom);
      rect.lineTo(i.left + arc, c.getHeight() - i.bottom);
      rect.quadTo(i.left, c.getHeight() - i.bottom, i.left, c.getHeight() - i.bottom - arc);
      rect.lineTo(i.left, i.top + arc);
      rect.quadTo(i.left, i.top, i.left + arc, i.top);
      rect.closePath();

      g2.fill(rect);
    }

    Icon icon = MacIconLookup.getIcon("spinnerRight", false, false, c.isEnabled());
    icon.paintIcon(c, g, x, i.top);
  }
@Override
  public void paint(Graphics g, JComponent c)