I'm pretty new to Java and GUI programming, so I have been looking at Swing for GUI programming and I have been looking at javazoom's projects for audio references. I'm currently working on creating a progress/seek bar in Swing however I'm not really sure what I should set the max value at for the slider, should it be in the AudioInputStream's available() method's byte number return when the stream is first returned (before anything is read) or should it be something else? Also how often should the slider update...ever time I read a new byte array into the dataLine/sourceLine from the input stream?

The total data size is a good number, or take an estimate of the total time needed.
How often you update is up to you, after each Xth read operation would be good (where X is a number you decide on based on performance).
Updating after every read might cause too great a performance hit but you could start with that and then reduce the update frequency until everything seems to perform nicely and still not be jerky.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.