dlg = new Dialog();
Create a new dialog object, you can add controls to the dialog using the Dialog.addCtrl() methods. When done, you can show the dialog using Dialog.showModal() or Dialog.show().
For simple dialogs, please also have a look at the static methods alert(), confirm() and prompt().