playThread = new PlayThread(playListManager);
playThread = new PlayThread(playListManager, new PlayerList());
  public Client() {       File file = new File("trackdatabase.xml");	    try {      trackDatabase = new TrackDatabase(file);      trackDatabase.purge();    }    catch (IOException e) {		e.printStackTrace();    }        //try to do a nice initial experience for theuser   	//do as much handholding as possible	if(!file.exists())	{		new AccountDialog(display, trackDatabase);		String players[] = {"madplay","mpg321","mpg123"};		String prefixes[] = {"/usr/bin/", "/usr/local/bin/",""};		for(int i=0;i<prefixes.length;i++)			for(int j=0;j<players.length;j++){				String player = prefixes[i] + players[j];				if(new File(player).exists()){					trackDatabase.setPlayer(player);					break;				}			}		trackDatabase.setAutoDownload(2);	}    playListManager = new PlayListManager(trackDatabase);    playThread = new PlayThread(playListManager); 	initGUI();        playThread.addUpdateListener(this);    playThread.start();                downloadThread = new DownloadThread(trackDatabase) {      public void process() {        super.process();       // perhapsDisableAccount();      }      public void handleError(String code, String urlString) {        //actionSetContinuousDownload(false);        URL url;        if (urlString.indexOf(':') < 0)          url = getClass().getResource("help/" + urlString);        else           try {            url = new URL(urlString);          }          catch (MalformedURLException e) {            e.printStackTrace();            url = getClass().getResource("help/malformedurl.html");          }        MessageBox msg = new MessageBox(shell, SWT.ICON_ERROR);        msg.setMessage("Error with url:"+url);        msg.open();      }    };    final Client client = this;    downloadThread.addUpdateListener(new UpdateListener() {      public void actionPerformed() {        String state = downloadThread.getState();        if (!strState.equals(state)) {          strState = state;        }        display.asyncExec(new Runnable() {          public void run() {            int n = downloadThread.getPercentComplete();            if(n > 0 && n < 100)            {              lblState.setText(strState + " "+n +"%");              progressBar.setSelection(n);            }else              lblState.setText(strState);                      }        });      }    });    downloadThread.start();    	//if this is the first run of irate do that  	if(!file.exists())  		downloadThread.go();  }