@Override
    public void actionPerformed(ActionEvent e) {
        WindowCreator creator = new WindowCreator(gui.getFrame());
        JDialog dialog = creator.createNewJDialog("Modify settings", 500, 250);
        dialog.setResizable(false);

        JPanel mainPanel = new JPanel();
        setBorderAndLayout(mainPanel);

        Settings settings = gui.getSettings();

        JComboBox numberOfThreadsList = 
                createNumberOfThreadsSelection(mainPanel, settings);
        JComboBox numberOfDigitsList = 
                createNumberOfDigitsSelection(mainPanel, settings);
        JTextField defaultNumberOfSimulations = 
                createDefaultNumberOfSimulationsSelection(mainPanel, settings);
        JCheckBox showMinorErrorMessages = 
                createShowMinorErrorMessagesSelection(mainPanel, settings);

        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new GridLayout(1, 4, 20, 20));
        createOkButton(buttonPanel, numberOfThreadsList, numberOfDigitsList, 
                defaultNumberOfSimulations, showMinorErrorMessages, dialog, settings);
        createCancelButton(buttonPanel, dialog);

        mainPanel.add(new JLabel(""));
        mainPanel.add(buttonPanel);
        dialog.setContentPane(mainPanel);
    }