Project 3 MP3 Jukebox

Due Friday, Oct 29 11:59pm. Submission through SVN.
Please submit your work in an SVN directory< your username >/cs112/proj3



Project 3 MP3 Jukebox is to develop a simple MP3 player with a graphical user interface. This project will help you learn how to implement an interface, how to pass values and return meaningful outcomes between classes, and how to use some Graphic User Interfaces features.

You will need to write two classes, JukePlayer and JukeBoxControls. Use in Chapter 10 for the main method (do not change this class), and use in Chapter 10 to see what GUI components you can use. JukePlayer implements MP3Player interface, and JukeBoxControls will use JukePlayer to play given files. Note that your JukeBoxControls should not use JLayer directly, but only through your own JukePlayer. Eclipse might complain about serialVersionUID of JukeBoxControls. You can ignore this warning for this project.

An example execution video is here.

The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Adobe Flash Player. If you are using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Adobe Flash Player by downloading here.

Use in Chapter 9 to learn how to use JFileChooser.

You will need to use JLayer for mp3 player. Download, unzip, and add jl1.0.1.jar. (In Eclipse, right clickon proj3 project and select Build Path. Select "Add External Archives". Navigate to the jar and click Open).

Once the play starts, your program will become unresponsive while the song is played. For a stop button to work in the middle of playing, you need to spawn a thread for the player. Here is how to start a thread.

InputStream is = new InputStream(file);
player = new Player(is);
Thread t = new Thread() {
    public void run() {
        try {
        } catch(Exception e) {

  1. Play button works correctly.(30%)
  2. Open button works correctly.(30%)
  3. Stop button works correctly.(30%)
  4. All three buttons work correctly. (10%)
Extra credit options (up to 100%)
You may earn extra credits by implemention some of the following functionalities. Note that the sum of all options exceeds 100%, but extra credit greater than 100% will count as 100% towards the grade.
  1. A "Remove" button that removes the currently selected file from the drop down menu.(up to 30%)
  2. Continue to play the next file in the list. Stop at the end of the last file. (up to 50%)
  3. A "Shuffle" button that plays songs in the list in a random order. (up to 50%)
  4. Open option: Please discuss with the instructor if you plan to do your own improvment. The amount of extra credit will depend on the details of improvements. (up to 50%)