private void generateRandomButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateRandomButtonActionPerformed
        resetSetParametersPart();
        resetProblemPart();
        final String difficulty = getSelectedButtonText(difficultyButtonGroup);
        final int problemIndex = getSelectedProblemIndex();
        final Class<? extends MathProblem> selectedProblemClass =
                Config.CLASSES.get(problemIndex);
        
        try {
            switch (problemIndex) {
                case Config.GCD:
                case Config.BEZOUT:
                    mathProblem = selectedProblemClass.getDeclaredConstructor(
                            String.class, boolean.class).newInstance(difficulty, false);
                    break;
                    
                default:
                    mathProblem = selectedProblemClass.getDeclaredConstructor(
                            String.class).newInstance(difficulty);
                    break;
            }
            start();
        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException 
                | InvocationTargetException | NoSuchMethodException | SecurityException ex) {
            System.err.println(ex.getMessage());
        }
    }//GEN-LAST:event_generateRandomButtonActionPerformed