code: private void settingsLoadMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_settingsLoadMenuItemActionPerformed
          JFileChooser fc = new JFileChooser();
          if (settingsFile != null) {
              fc.setSelectedFile(settingsFile);
          } else {
              fc.setSelectedFile(DEFAULT_SETTINGS_FILE);
          }
          int returnVal = fc.showOpenDialog(this);
          if (returnVal == JFileChooser.APPROVE_OPTION) {
              File file = fc.getSelectedFile();
              try {
                  loadSettings(file);
              } catch (Exception ex) {
                  Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE,
                          "Could not load settings from \"" + file + "\"", ex);
              }
          }
  
      }
docs: GEN-LAST:event_settingsLoadDefaultsMenuItemActionPerformed