Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
When the Show button is clicked for the first time, the dialog instance is created...
and it is shown .
A dialog always needs a frame to be constructed. If this were a stand-alone application, we would already have a JFrame instance. This being an applet, though, we have to create a frame.
The reference to the JFrame is passed on to javax.swing.JDialog's constructor.
super means superclass, JDialog.
The false parameter will cause the dialog not to lock up the main window, so the user can switch between both. Kind of like a find-dialog as opposed to a file-dialog.
This dialog state is called modeless or non-modal.
The dialog's contentpane is filled with components,...
that return their state/contents upon request by the main class .
Our dialog object exists as long as the applet does, because when the user closes the dialog, it is merely made invisible .
So the components in the dialog can still be queried, anytime, because the Java instance, in memory, stays intact.