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);
    public AlertDialog(Frame parent, String title, String message) {        super(parent, title, true);                labMessage = new Label(message, Label.CENTER);        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();        setResizable(false);        setLocation(parent.getLocation().x + parent.getSize().width/2 - getSize().width/2,                    parent.getLocation().y + parent.getSize().height/2 - getSize().height/2);    }