The JDialog Class
JDialog is the Swing version of its superclass, java.awt.Dialog. It provides the same key
features described in Chapter 8
[2] in the discussion of JWindow, JFrame, and JApplet: it uses a JRootPane as its container, and it provides
default window-closing behavior. Since JDialog extends java.awt.Dialog, it has a heavyweight peer and
is managed by the native windowing system. Figure 10-1 shows how JDialog fits into the class hierarchy.

Figure 10-1. JDialog class diagram
Properties
JDialog defines the
properties and default values listed in Table 10-1. The content-Pane, glassPane, JMenuBar, and layeredPane properties are taken from
rootPane, which is set to a new
JRootPane by the
constructor.
Table 10-1. JDialog properties
Property | Data type | get | is | set | Default value |
|---|---|---|---|---|---|
| | · | | ||
| | · | · | From | |
| | · | · | | |
| | · | · | Depends on L&F, often | |
| | · | · | From | |
| | · | · | | |
| | · | · | From | |
| | · | · | | |
| | · | · | | |
| | · | | ||
| | · | | ||
| | · | · | | |
1.4since 1.4, ooverridden, sstatic *Inherited
from |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access