public static JDialog createDialog (Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) throws HeadlessException

Creates and returns a new dialog containing the specified ColorChooser pane along with "OK", "Cancel", and "Reset" buttons. If the "OK" or "Cancel" buttons are pressed, the dialog is automatically hidden (but not disposed). If the "Reset" button is pressed, the color-chooser's color will be reset to the color which was set the last time show was invoked on the dialog and the dialog will remain showing.

Parameters:
c    the parent component for the dialog
title    the title for the dialog
modal    a boolean. When true, the remainder of the program is inactive until the dialog is closed.
chooserPane    the color-chooser to be placed inside the dialog
okListener    the ActionListener invoked when "OK" is pressed
cancelListener    the ActionListener invoked when "Cancel" is pressed

Returns:  a new dialog containing the color-chooser pane

Exceptions:
HeadlessException    if GraphicsEnvironment.isHeadless() returns true.

See also:
java.awt.GraphicsEnvironment.isHeadless