This is the second of two assignments doing small applets using the AWT.
For this assignment, you may design your own applet using a separate frame or dialog box. Note that if you put up a frame, you can have a menubar with menus.
Or you can choose to extend the applet that you wrote last time with a dialog box to report some error condition. The dialog box can be defined in a separate class within the same file as the applet. It will be a subclass of Dialog.
So in your dialog box class, your box should minimally have a Label with the error message and a button that says something like "ok" that makes the box disappear.
(You may have noticed in the API under java.lang.Integer that the method
parseInt can give the exception NumberFormatException. But you don't need
to use a try/catch block to test for it because the calculator applet only
allows digits 0-9 to be put into the textfield for parseInt to use. But
in a general textfield situation, you may need to test that the input is
correctly formatted.)
When you submit your applet, link both the applet (.html file) and the
source code (.java file) to your homework page (along with problem and
program description as usual). Also please make a note of what browser
or appletviewer your applet looks best in.