You're code shows magical thinking, where you assume that when you change the value of a primitive variable used to set the initial state of a JSlider, speedValue, the JSlider's state will then magically change. Java doesn't work this way, and if you want to change JSlider's state, you're going to have to call a method on it that explicitly does this:
slider.setValue(...);
So wherever you wish to change the JSlider's value, you will need to call this method on the appropriate JSlider reference.
You will want to delete your other duplicate question by the way.