public AlertDialog(Frame parent, String title, String message, boolean modal) { super(parent, title, modal);
public AlertDialog(Frame parent, String title, String message) { super(parent, title, true);
    public AlertDialog(Frame parent, String title,                       String message, boolean modal) {        super(parent, title, modal);                labMessage = new AdvancedLabel(message);        butOkay.addActionListener(this);                // layout        GridBagLayout gridbag = new GridBagLayout();        GridBagConstraints c = new GridBagConstraints();        setLayout(gridbag);                    c.fill = GridBagConstraints.BOTH;        c.insets = new Insets(10, 10, 10, 10);        c.weightx = 1.0;    c.weighty = 0.0;        c.gridwidth = GridBagConstraints.REMAINDER;        gridbag.setConstraints(labMessage, c);        add(labMessage);                    c.weightx = 1.0;    c.weighty = 1.0;        c.fill = GridBagConstraints.VERTICAL;        c.ipadx = 20;    c.ipady = 5;        gridbag.setConstraints(butOkay, c);        add(butOkay);                addWindowListener(new WindowAdapter() {        public void windowClosing(WindowEvent e) { setVisible(false); }    });                pack();        Dimension size = getSize();        boolean updateSize = false;        if ( size.width < GUIPreferences.getInstance().getMinimumSizeWidth() ) {            size.width = GUIPreferences.getInstance().getMinimumSizeWidth();        }        if ( size.height < GUIPreferences.getInstance().getMinimumSizeHeight() ) {            size.height = GUIPreferences.getInstance().getMinimumSizeHeight();        }        if ( updateSize ) {            setSize( size );            size = getSize();        }        setResizable(false);        setLocation(parent.getLocation().x + parent.getSize().width/2 - size.width/2,                    parent.getLocation().y + parent.getSize().height/2 - size.height/2);    }