private JButton prepareBrowseButton(final JTextField fileField)
  {
    JButton fileBrowse = new JButton("Browse");

    fileBrowse.addActionListener(new ActionListener()
    {

      public void actionPerformed(ActionEvent e)
      {
        JFileChooser chooser = new JFileChooser();
        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);  
        int returnVal = chooser.showOpenDialog(chooser);

        if (returnVal == JFileChooser.CANCEL_OPTION)
        {
          System.out.println("cancelled");
        }

        else if (returnVal == JFileChooser.APPROVE_OPTION)
        {
          File fastaFile = chooser.getSelectedFile();
          fileField.setText(fastaFile.getAbsolutePath());
        }

        else
        {
          System.out.println("Encountered Unknown Error");
          System.exit(0);
        }
      }
    });

    return fileBrowse;
  }