private void createErrorWindow(String infoString, int width, int height) {
            WindowCreator creator = new WindowCreator(mainDialog);
            JDialog dialog = creator.createNewJDialog("Error!", width, height);

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

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

            JPanel topPanel = new JPanel();            
            JLabel errorMessage = new JLabel(infoString);
            topPanel.add(errorMessage);
            mainPanel.add(topPanel);
            
            JPanel bottomPanel = new JPanel();
            bottomPanel.setLayout(new GridLayout(1,3,20,20));
            
            JButton okButton = new JButton("OK");
            okButton.addActionListener(new CloseWindow(dialog));
            bottomPanel.add(new JLabel(""));
            bottomPanel.add(okButton);
            bottomPanel.add(new JLabel(""));            
            
            mainPanel.add(bottomPanel);
            
            dialog.setContentPane(mainPanel);            
        }