private boolean runEvolutionaryAlgorithm() throws HeadlessException, IllegalStateException {
        try {
            readSettingsParameters();
        } catch (NumberFormatException numberFormatException) {
            JOptionPane.showMessageDialog(this, "Błąd wprowadzonych danych!");
            return true;
        }
        gcp = new GraphColoringProblem(graph, settings.colors, jRadioButton1.isSelected(), jRadioButton4.isSelected());
        ea = new GeneticAlgorithm<>(gcp, settings.populationSize, settings.parentsSize, settings.crossProbability, settings.mutationProbability, settings.maxIterations);
        try {
            ea.validate();
        } catch (IllegalStateException illegalStateException) {
            JOptionPane.showMessageDialog(this, illegalStateException.getMessage());
            return true;
        }
        jProgressBar1.setValue(0);
        jProgressBar1.setString("0");
        setButtonsState(false);
        new Thread(new Runnable() {
            @Override
            public void run() {
                ea.run();
                jLabel7.setText(String.format("Info: Best Result: %.4f No of Iteration: %d", ea.bestSolutionCost, ea.iterations));
                plot(ea.max, ea.avg, ea.min, p, settings.maxPlotVars);
                //jProgressBar1.setIndeterminate(false);
                setButtonsState(true);
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                do {
                    try {
                        Thread.sleep(settings.refreshNotificationTime);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    int iter = ea.iterations;
                    double fval = ea.bestSolutionCost;
                    jProgressBar1.setValue(iter * 100 / settings.maxIterations);
                    jProgressBar1.setString(String.format("It: %d Fval: %.4f", iter, fval));
                } while (ea.isRunning());
            }
        }).start();
        return false;
    }