code: private void buttonChooseFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonChooseFileActionPerformed
      final File theFile = new File(this.textFieldFilePath.getText().trim());
      final File parent = theFile.getParentFile();
  
      final JFileChooser chooser = new JFileChooser(parent == null ? this.projectFolder : parent);
      if (theFile.isFile()) {
        chooser.setSelectedFile(theFile);
      }
      chooser.setApproveButtonText("Select");
      chooser.setDialogTitle("Select file");
      chooser.setMultiSelectionEnabled(false);
      chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
  
      if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
        final File selected = chooser.getSelectedFile();
        this.textFieldFilePath.setText(selected.getAbsolutePath());
      }
    }
docs: GEN-LAST:event_labelBrowseCurrentLinkMouseClicked