JDialog Flashcards

1
Q

JDialog

A

Independant sub-window used for temporary purposes independent of main window content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

JDialog Usage Examples

A

Display error messages
Display warnings
Present images
Directory trees

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Swing component classes that directly instantiate and display dialogs

A
JOptionPane
ProgressMonitor
JColorChooser
JFileChooser
Printing API
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are dialogs dependent upon?

A

Frame components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If frame is iconified…

A

…dependent Dialogs dissapear from the screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If frame is deiconified…

A

…dependent Dialogs return to the screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Dialogs can be MODAL

A

Blocks user input to all other windows in the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Create modal dialog

A

JOptionPane creates modal JDialogs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Create non-modal dialog

A

Use JDialog class directly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

JDialog class is subclass of…

A

AWT (Abstract Windows ToolKit) java.awt.Dialog class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does java.awt.Dialog class do?

A

Adds a root pane container and support for a default close operation to the Dialog object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

JOptionPane

A

Container that automatically creates a JDialog and adds itself to the JDialog’s content pant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Using JOptionPane to customize

A
Lays out std dialog
Provides icons
Specify dialog title and text
Customizing button text
Customize components the dialog displays
Specify where dialog appears on screen
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

JOptionPane icons

A

Question
Information
Warning
Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Constructors for JDialog create a JDialog instance

A

Boolean argument
Set to true to specify model dialog, else set to false or absent
Specify title of dialog using string argument

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

setDefaultCloseOperation()

A

DO_NOTHING_ON_CLOSE
HIDE_ON_CLOSE
DISPOSE_ON_CLOSE