dialog = new ModalDialog((Dialog) parent, title); dialog.setModal(modal);
dialog = new JDialog((Dialog) parent, title, true);
	public static JDialog createDialog(Component component, String title,			boolean modal, JColorChooser chooserPane,                                     ActionListener okListener,                                     ActionListener cancelListener)  {    Component parent = findParent(component);    if (parent == null)      throw new AWTError("No suitable parent found for Component.");    JDialog dialog;    if (parent instanceof Frame)      dialog = new ModalDialog((Frame) parent, title);    else      dialog = new ModalDialog((Dialog) parent, title);    dialog.setModal(modal);    dialog.getContentPane().setLayout(new BorderLayout());    JPanel panel = new JPanel();    panel.setLayout(new FlowLayout());    ActionListener al = new DefaultOKCancelListener(dialog);    JButton ok = new JButton("OK");    ok.addActionListener(okListener);    ok.addActionListener(al);    JButton cancel = new JButton("Cancel");    cancel.addActionListener(cancelListener);    cancel.addActionListener(al);    JButton reset = new JButton("Reset");    reset.addActionListener(new DefaultResetListener(chooserPane));    dialog.getContentPane().add(chooserPane, BorderLayout.NORTH);    panel.add(ok);    panel.add(cancel);    panel.add(reset);    dialog.getContentPane().add(panel, BorderLayout.SOUTH);    return dialog;	} // createDialog()