Overview | Methods | This Package | All Packages
Retrieves a value indicating the color the user selected in the dialog box.
Syntax
public final Color getColor()
Return Value
Returns a Color object that represents the color the user selected.
Remarks
If the user didn't select a color, this method returns zero (0), which is represents the color black. To distinguish between the case of the user choosing the color black and not choosing a color at all, be sure to check the return value of the showDialog method before checking the return value of the getColor method. For a code example using this method, see the ColorDialog control topic.
See Also setColor