}
// Get the max width of the min or max value of the slider.
FontMetrics fm = slider.getFontMetrics(slider.getFont());
valueRect.width = Math.max(synthGraphics.computeStringWidth(context, slider.getFont(), fm, "" + slider.getMaximum()),
synthGraphics.computeStringWidth(context, slider.getFont(), fm, "" + slider.getMinimum()));
int l = valueRect.width / 2;
int w1 = trackInsets.left + trackRect.width / 2;
int w2 = trackRect.width / 2 + trackInsets.right + tickRect.width + labelRect.width;
contentDim.width = Math.max(w1, l) + Math.max(w2, l) + 2 + insetCache.left + insetCache.right;