I have made a third thumb -yellow one- for this java swing range slider. If I move first and second thumb I see the change of values in jlabels during movement to the left or right. But the third thumb (it has yellow color and from me) send to jLabel2 only the last value, it does not show the changes in the value during the movement to the right or left. How can solve this problem ,so that I see the changing values during movements ?
My GitHub Link :
Code from my test file :
rangeSliderWithThreeThumbs1.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
rangeSliderWithThreeThumbs1StateChanged(evt);
}
});
private void
rangeSliderWithThreeThumbs1StateChanged(javax.swing.event.ChangeEvent evt) {
//value from fist thumb
jLabel1.setText(Integer.toString(rangeSliderWithThreeThumbs1.getValue()));
//value from second thumb
jLabel3.setText(Integer.toString(rangeSliderWithThreeThumbs1.getUpperValue()));
//value from third thumb
jLabel2.setText(Integer.toString(rangeSliderWithThreeThumbs1.getSecondUpperValue()));
}