code: @Override
  	public void actionPerformed(ActionEvent evt) {
  		// Perform action...
  		final JFileChooser fc = new JFileChooser();
  
  		//		In response to a button click:
  		int returnVal = fc.showOpenDialog(null);
  		if ( returnVal == JFileChooser.APPROVE_OPTION) {
  			File file = fc.getSelectedFile();
  			textField.setText(file.getAbsolutePath());
  			textField.repaint();
  
  
  		}
  
  	}
docs: This method is called when the button is pressed