@Override
    public JDialog getDialog(Window parent, String title) {
        if (window == null) {
            window = new JDialog(parent);
            window.setTitle(title);
            window.setContentPane(getPane());
            window.pack();
            window.setVisible(true);
        }
        return window;

    }