@Override
  protected void paintComponent(Graphics g) {
    if (!isVisible()) return;

    if (myColor == null) return;

    g.setColor(myColor);
    if (myOrientation == SeparatorOrientation.HORIZONTAL) {
      int length = getWidth() - myHGap * 2;
      if (myShadow != null) length--;
      paintHorizontalLine(g, myHGap, myVGap, length);
      if (myShadow != null) {
        g.setColor(myShadow);
        paintHorizontalLine(g, myHGap + 1, myVGap + 1, length);
      }
    }
    else {
      int length = getHeight() - myVGap * 2;
      if (myShadow != null) length--;
      paintVerticalLine(g, myHGap, myVGap, length);
      if (myShadow != null) {
        g.setColor(myShadow);
        paintVerticalLine(g, myHGap + 1, myVGap + 1, length);
      }
    }
  }
@Override
  protected void paintComponent(Graphics g)