code: @Override
  	public void actionPerformed(ActionEvent evt) {
  		// Perform action...
  		JFileChooser chooser = new JFileChooser();
  		String txt = textField.getText();
  
  		if ( config == null) {
  			System.out.println("config == null, calling getWebStartConfig...");
  			config = WebStartMain.getWebStartConfig();
  		}
  		if ( txt != null){
  			chooser.setCurrentDirectory(new java.io.File(txt));
  			config.setPdbFilePath(txt);
  
  		}
  		chooser.setDialogTitle("Choose directory that contains your PDB files");
  		chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
  		//
  		// disable the "All files" option.
  		//
  		chooser.setAcceptAllFileFilterUsed(false);
  		//
  
  
  //		In response to a button click:
  		int returnVal = chooser.showOpenDialog(null);
  		if ( returnVal == JFileChooser.APPROVE_OPTION) {
  			File file = chooser.getSelectedFile();
  			textField.setText(file.getAbsolutePath());
  			textField.repaint();
  		}
  
  	}
docs: This method is called when the button is pressed