private void openSettingsSavingFailedDialog() {
        WindowCreator creator = new WindowCreator(gui.getFrame());
        JDialog errorDialog = creator.createNewJDialog("Error", 260, 110);

        JPanel mainPanel = new JPanel();
        Border padding = BorderFactory.createEmptyBorder(10, 10, 10, 10);

        mainPanel.setBorder(padding);
        mainPanel.setLayout(new GridLayout(2, 1));

        createErrorMessageForDialog(mainPanel);

        JPanel buttonPanel = new JPanel();

        JButton okButton = new JButton("Close program");
        okButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                System.exit(0);
            }
        });

        buttonPanel.add(okButton);
        mainPanel.add(buttonPanel);

        errorDialog.setContentPane(mainPanel);
    }