Constructing a Dialog
public Dialog(Frame parent, String title, boolean modal)
Constructs an initially invisible dialog box with a title under the specified frame. The modal parameter (true or false) indicates whether other windows can be accessed before the dialog is dismissed. The parent parameter is required, and other two parameters are optional.