Improve JSlider to handle invalid settings