@Override
	public void mousePressed(MouseEvent arg0) {
		// TODO Auto-generated method stub
		
		if(arg0.getSource() == close)
		{
			player.Stop();
			controller.removePlayer(player);
			dead=true;
			newWindow.dispose();
		}
		if(arg0.getSource() == static_Open || arg0.getSource() == addSong)
		{
			JFileChooser chooser = new JFileChooser();
		    FileNameExtensionFilter filter = new FileNameExtensionFilter("MP3 Audio Files", "mp3");
		    chooser.setFileFilter(filter);
		    chooser.grabFocus();
		    int returnVal = chooser.showOpenDialog(menu);
		    
		    if(returnVal == JFileChooser.APPROVE_OPTION)
		    {
		    	String chosenFile = chooser.getSelectedFile().getAbsolutePath();
		    	if(arg0.getSource() == static_Open)player.play(chosenFile);
		    	else
		    		table.addToList(chosenFile);
		    }
		}
		else if(arg0.getSource() == controls)
		{
			shuffle.setSelected(player.shuffle.isSelected());
			repeat.setSelected(player.repeat.isSelected());
			recent.removeAll();
			ArrayList<String> songs = controller.getSongHistory();
			for(int i = 0; i < songs.size(); i++)
			{
				final JMenuItem jm = new JMenuItem(songs.get(i));
				jm.addActionListener(new ActionListener(){

					@Override
					public void actionPerformed(ActionEvent arg0) 
					{
						//System.out.println(jm.getText());
						player.play(jm.getText());
					}
					
				});
				recent.add(jm);
			}
		}
	}