private void createOkButton(JPanel panel, JComboBox numberOfThreadsList, 
            JComboBox numberOfDigitsList, JTextField defaultNumberOfSimulations, 
            JCheckBox showMinorErrorMessages, JDialog dialog, Settings settings) {
        JButton okButton = new JButton("OK");
        okButton.addActionListener(new UpdateSettings(numberOfThreadsList,
                numberOfDigitsList, defaultNumberOfSimulations, 
                showMinorErrorMessages, settings, dialog, gui));

        panel.add(okButton);
    }