You're going to have to declare the AudioClip outside the actionPerformed method. When you click the button, you check whether it's currently playing- if it is, you stop it, if it's not, you start it.