Internal Dialog

The InternalDialog class displays a Dialog-like window on top of a region, usually another panel. Compared to a regular Dialog an internal dialog is always lightweight and not controlled by the OS. A InternalDialog is modal to the owner region by default and appears on top of a translucent background pane which completely covers the owner region. A bunch of predefined standard dialogs are provided by the DialogFactory.

In the screenshot below you can see how the dialog appears on the content panel of a TabPane. Because other controls are still accessible the user is not completely blocked and still able to select tabs and buttons of the ToolBar.

The DialogFactory can be used to create some standard dialogs. Methods for internal dialogs always start with showInternal... or createInternal.... Usage is pretty similar to regular dialogs.

try{
  ...
}
catch (Exception e){
  DialogFactory.showInternalError(pane, "Database Connection Error", "The database connection is broken - please try again later or contact the support hotline.", "Network Error"));  
}
    
InternalDialog<ActionType> infoDialog = DialogFactory.createInternalInfo(ownerPane, "Just a short information!", "Some detailed information why the dialog is shown. On error give some hints on how to do it right. When the description is set to null this text element will not appear.", "My InfoDialog Title");    
infoDialog.showAndWait();
ActionType type = infoDialog.getResult();
For more information about how to create a custom dialog see Custom Dialog.

See also

Dialogs
Standard Dialogs
Frame
Internal Frame
CSS Reference - Internal Dialog