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