The StandardDialog Class

The StandardDialog class is an extension of the JDialog class and was introduced for the following reasons:

  1. Standardize the mechanism for internationalization and localization handling

  2. Standardize the position, location, and behavior of dialog “action” buttons

  3. Standardize some of the accessibility handling for modal dialogs

  4. Standardize the handling of results

The StandardDialog class contains the following protected (or private) fields:

Table 2. Fields in the StandardDialog Class  

Field

Description

okBtn

An instance of an OK button. This is one of the standard controls described in Dialog Initialization.

cancelBtn

An instance of a Cancel button. This is one of the standard controls described in Dialog Initialization.

helpBtn

An instance of a Help button. This is one of the standard controls described in Dialog Initialization.

buttons

An instance of a ButtonPanel. The ButtonPanel is one of the standard controls described in Dialog Initialization.

resources

An instance of a ResourceBundle object. This resource bundle is used for internationalization purposes.

adapter

An instance of a StandardDialogAdapter.

dialogResult

An instance of a DialogResult object.

saveDialogBounds

A boolean value indicating whether the bounds (location and size) of this dialog should be saved when it is closed.