trackDatabase.setAutoDownload(5);
  private void createAccount() {    //do the gui bits    btnAccept.setEnabled(false);    trackDatabase.setUserName(txtUser.getText());    trackDatabase.setPassword(txtPassword.getText());    trackDatabase.setHost(txtServer.getText());    trackDatabase.setPort(Integer.parseInt(txtPort.getText()));    final String txtDirText = txtDirectory.getText();        new Thread(new Runnable(){      public void run() {                   // Check the current directory for an existing trackdatabase.xml for       // compatibility reasons only.       File dir = new File(".");           File file = new File(dir, "trackdatabase.xml");         if (!file.exists()) {        dir = new File("/irate");          file = new File(dir, "trackdatabase.xml");          dir = new File(txtDirText, "irate");                  if (!dir.exists())          dir.mkdir();                file = new File(dir, "trackdatabase.xml");          dir = new File(dir, "download");                  if(!dir.exists())          dir.mkdir();       }                    try {        Preferences.savePreferenceToFile("downloadDir", file.toString());        } catch (IOException ioe) {        ioe.printStackTrace();      }      trackDatabase.setFile(file);      trackDatabase.setDownloadDir(dir);            UpdateListener ul = new UpdateListener() {        public void actionPerformed() {          display.syncExec(new Runnable() {            public void run() {              lblStatus.setText(downloadThread.getDownloadState());              lblStatus.pack();            }          });//inner class        }//method        public void newTrackStarted(Track track) { }      };//ul      downloadThread.addUpdateListener(ul);      downloadThread.contactServer(trackDatabase);      downloadThread.removeUpdateListener(ul);      //System.out.println("grrr");      if (trackDatabase.getNoOfTracks() != 0) {        done = true;        success = true;        trackDatabase.setAutoDownload(5);      }else {        display.asyncExec(new Runnable() {          public void run() {            btnAccept.setEnabled(true);            stackLayout.topControl = controls[controlIndex = 1];            steps.layout();          }        });      }          }    }).start();  }