Hi guys, I am taking Java classes at a college level.
I am playing around with JSliders and an addChangeListener.
The gist of my code is I have two sliders, one is MPH the other is KPH. When one slider is slid, the two fields update and the other slider follows. if you move the other slider, the same happes.
My problems seems that when the addChangeListener updates the other slider, it calls the same addChangeListener and then they both stick at 0.
I am using an if statement to run seperate commands depending on which slider calls the addChangeListener.
in this code if I uncomment the statements to update the other slider in the addChangeListener then it doesnt work, with them commented, the other slider does not update.
Here is my code.