public void actionPerformed(final ActionEvent e) {
    if (e.getSource() == timer) {
      progressBar.setValue(getProgress());
    }
    else {
      if ("Play".equals(e.getActionCommand())) {
        playIt();
      }
      else if ("Pause".equals(e.getActionCommand())) {
        if (state == STATE_PAUSED) {
          playIt();
        }
        else if (state == STATE_PLAYING) {
          pauseIt();
        }
      }
      else if ("Stop".equals(e.getActionCommand())) {
        stopIt();
      }
      else {
      }
    }
  }