private void loadBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadBrowseButtonActionPerformed
        JFileChooser f = new JFileChooser(loadFromField.getText());
        File fi = new File(loadFromField.getText());
        if(fi.isDirectory()) {
            f.setCurrentDirectory(fi);
        }
        else {
            f.setSelectedFile(fi);
        }
        class SaveGameFileFilter extends javax.swing.filechooser.FileFilter {
            public boolean accept(File f) {
                return f.isDirectory() || f.getName().toLowerCase().endsWith(".eu3");
            }
            
            public String getDescription() {
                return "Europa Universalis 3 saved game files";
            }
        }
        f.addChoosableFileFilter(new SaveGameFileFilter());
        f.setDialogTitle("Open File");
        f.setFileSelectionMode(JFileChooser.FILES_ONLY);
        int result = f.showOpenDialog(this);
        if (result == JFileChooser.APPROVE_OPTION) {
            fi = f.getSelectedFile();
            loadFromField.setText(fi.getPath());
            
            save = EU3SaveGame.loadSaveGame(fi.getPath(), Main.filenameResolver);
            
            //get date stuff
            String[] date = save.getDate().split("\\.");
            endYear = date[0];
            endYearField.setText(endYear);
            endYearField.setEditable(true);
            
            GenericObject defines =
                    EUGFileIO.load(Main.filenameResolver.resolveFilename("common/defines.txt"), defaultSettings);
            if(defines.contains("start_date")) {
                String sd = defines.getString("start_date");
                int dotpos = sd.indexOf("."); // dates are in format 1399.10.14
                startYear = sd.substring(0, dotpos);
            } else if (defines.containsChild("start_date")) {
                startYear = Integer.toString(defines.getChild("start_date").getInt("year"));
            } else { //not In Nomine
                startYear = "1453";
            }

            startYearField.setText(startYear);
            startYearField.setEditable(true);
            
            renderButton.setEnabled(true);
        }
    }//GEN-LAST:event_loadBrowseButtonActionPerformed