Creates a pre-built Swing dialog with OK and Cancel buttons. You can use this template to create message boxes and any other dialogs. Tip: You can also create other templates for dialogs. (For example, you might want a template with Yes, No, and Cancel buttons.) First create the dialog and then right-click the the source file's node in the Projects window and choose Save As Template from the contextual menu.