Help is available for each task.
Task 1
Create an applet with an init()
method that makes a dummy Frame
(because dialogs can only be "children" of frames) and then creates an
OKDialog
and shows the dialog. (OKDialog
is defined in
the next task.)
Task 2
Create OKDialog
as a subclass of BlockingDialog
(provided for you). It should add the label "Hit the button..."
followed by an "OK" button. Use a FlowLayout
object for geometry management and resize it to 100 x 100.
Task 3
In the applet's init()
method:
- Call
waitForResponse()
(a blocking method) on the
dialog right after showing it
- When the dialog (that is,
waitForResponse()
) returns, add the label
"Back from dialog..." to the applet
- Dispose of the dialog
Copyright 1996-2000 jGuru.com. All Rights Reserved.