private void createCancelButton(JPanel panel, JDialog dialog) {
        JButton cancelButton = new JButton("Cancel");
        cancelButton.addActionListener(new CloseWindow(dialog));
        panel.add(cancelButton);
    }