Welcome to JavaRanch.
I'm not familiar with how javax.sound works internally, but one thing that is definitely a problem with this code is that you're playing the sound from inside of the actionPerformed method. Event handlers should run (and terminate) quickly, lest they block other threads from running. So putting a Thread.sleep into an event handler is a big no-no. Start a new
thread that plays the sound, and ses if that improves matters.
Since this is really not a beginner question, I'll move it to the Other
Java APIs forum, where the Sound API is generally discussed.