public void saveResult() {
        if (ea != null && ea.bestSolution != null) {
            fj.showSaveDialog(this);
            if (fj.getSelectedFile() != null) {
                try {
                    PrintWriter out = new PrintWriter(fj.getSelectedFile());
                    for (int i = 0; i < ea.bestSolution.length; ++i) {
                        out.printf("v%d : %d\n", i + 1, ea.bestSolution[i]);
                    }
                    out.close();
                } catch (FileNotFoundException ex) {
                    Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
                    JOptionPane.showMessageDialog(rootPane, "Nieudana próba zapisu!");
                }
            }
        } else {
            JOptionPane.showMessageDialog(rootPane, "Brak wyniku!");
        }
    }