be more clear about what format you are trying to play.
if it's just a .wav file, you don't need any additional libraries, but, if you want (for instance) to play .mp3 files, you should note that they are not supported by core Java.
in order to play those, you'll need to add an additional library or framework that can help you out.
my first thoughts would be the Java Media Framework api, or JMF for short, or JavaZoom's JLayer library.
personally, when I once tried to write my own mp3 player, I preferred JLayer over JMF. JMF hadn't been updated for quite a while, and it was a bit more messy to set everything up. besides, JLayer is pretty easy to work with, if you go through the documentation and example(s) they offer.
Thanks in advice i tryed with (.wav) and worked but my project is to drag it in the program or upload it and just play/stop from there, yeah it is like small player, so if you can give me some exsample how to start with that draging/uploading and stop/play.
you can always use a JFileChooser to add them, just store them in a tracklist, and for the rest, just consider your tracks as Objects, with instance members: