/** * If labels are a value other than a double, this method converts and sets the new labels in the * corect format * * @param divisor * @param sliderMinimum * @param sliderMaximum */ private void generateNewLabels(double divisor, int sliderMinimum, int sliderMaximum) { Hashtable convertedLabels = new Hashtable(); int j = 0; for (int i = sliderMinimum; i < sliderMaximum; i += divisor, j++) { createSliderLabel(convertedLabels, i, divisor); } // Now, convert and explicitly add our terminating value createSliderLabel(convertedLabels, sliderMaximum, divisor); rangeSlider.setLabelTable(convertedLabels); }