code: private void buttonImportFromFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonImportFromFileActionPerformed
      final File file = DialogProviderManager.getInstance().getDialogProvider().msgOpenFileDialog(this, "importProperties", "Import settings", null, true, new PropertiesFileFilter(), "Open");
      if (file != null) {
        try {
          load(new PropertiesPreferences("SciaReto", FileUtils.readFileToString(file, "UTF-8")));
        } catch (final Exception ex) {
          LOGGER.error("Can't import settings", ex); //NOI18N
          DialogProviderManager.getInstance().getDialogProvider().msgError(Main.getApplicationFrame(), "Can't import settings [" + ex.getMessage() + ']');
        }
      }
    }
docs: GEN-LAST:event_buttonExportToFileActionPerformed