The changing of the minimum and maximum fire a stateChanged event as well. Therefore, in your event listener
you should keep track of whether or not you're already handling an event. I usually do this using a boolean:
However, I don't really get
why you need to change your minimum and maximum. In videos on Youtube etc, the minimum and maximum of a movie usually stay the same - the minimum at 00:00 and the maximum at the movie's end.