

setBackground(Color.WHITE): This function will set the background color of the UI component.

Also we need FileChooser which helps us to choose the mp3 music file from the directory of the system and one label is needed to print which current song is selected. We will need five image buttons such as play, pause, resume, stop, selecting song. In this step, we will create a user interface for our mp3 music player in java. Now Click on Add JAR/Folder and select the downloaded file to add in our project. At the bottom left Click on “New Library”ĭ. But for the Jlayer library, we have to download a jar from the internet and import it into our project.ī. In this step, we will import required packages such as swing, awt, Jlayer library, etc.īy default, Swing & AWT packages are installed by JAVA. Please download the source code of java music player project: MP3 Music Player Project Code Steps to Create MP3 Music Player using java: Jlayer is an open-source library we need to download from the internet.
