How to set a JSlider to the duration of an audio file?
问题 Is this event possible to implement in a JSlider or not? Also, can one be able to move the slider to a certain point in the audio file? To Elaborate, the user can drag the slider to any point in the JSlider which causes the playback to "rewind" or "skip". 回答1: In situation like this, you google. No I'm serious. I used the answer from java wav player adding pause and continue. and How do I get a sound file's total time in Java? and combined them into a solution which allows a JSlider to