The code below is an example of how I want to include a movie-like timeline component in my application.
I thought the easiest would be to make use of a JSlider. But somehow, I need to adjust the maximum/minimum
of the JSlider when the user is dragging the handle. I tried to simplify this a little bit, by only changing the
minimum/maximum when the user drags the knob to the min or max.
However, the way I make use of the ChangeListener now results in a StackOverflow. The single System.out.prinln
statement I've included shows that the current value grows along with the maximum value, even though I've tried
to reset it after the maximum is increased.
Does somebody know how to fix this?