trackRect.y = contentRect.y;
int h = getThumbSize().height; if (slider.getPaintTicks() && (slider.getMajorTickSpacing() > 0 || slider.getMinorTickSpacing() > 0)) h += getTickLength(); trackRect.y = contentRect.y + (contentRect.height - h) / 2 - 1;
  protected void calculateTrackRect()  {    if (slider.getOrientation() == JSlider.HORIZONTAL)      {	trackRect.x = contentRect.x + trackBuffer;	trackRect.y = contentRect.y;	trackRect.width = contentRect.width - 2 * trackBuffer;	trackRect.height = thumbRect.height;      }    else      {	trackRect.x = contentRect.x;	trackRect.y = contentRect.y + trackBuffer;	trackRect.width = thumbRect.width;	trackRect.height = contentRect.height - 2 * trackBuffer;      }  }