Lab Assignment 7 -- Demo and Writeup Due Oct. 25 in the lab session
CS 5551, Fall Semester, 2012
15 Points
Topics: Menus

The assignment: Modify the program of the previous assignment to: (1) have a menubar with the following menus: "File", "Shape", and "Color" menus on the left, and a "Help" menu on the right, with mnemonics F, p, C, and H respectively, and (2) have a popup menu that allows the user to quit. The interface should look something like:

+-----------------------------------------------------+
| File  Shape  Color                             Help |
+-----------------------------------------------------+
|                                                     |
|                                                     |
|             < blank area for drawing >              |
|                                                     |
|                                                     |
+-----------------------------------------------------+

Discussion: some useful code is in the PopupMenuDemo program. Here is the PopupMenuDemo program file. Also PopupMenuDemo program uses the file middle.gif file.

Part (1): menubar details:

Part (2): The popup menu should have three options: (1) Quit and Save Changes, (2) Quit Without Saving, and (3) Don't Quit. The first two should have the same effect - just exiting the program (we will handle "Save" later); Don't Quit should have no effect. Thus there will be many ways to exit the program.

Extra Enhancement:
1. (1 point) Try to use setToolTipText() on some of the menu items. Does it work?

What to turn in: Turn in the following items from the Computer Science Lab Report Format:
1. (1 point) The Basic Information (your name, class, section, TA's name, assignment number, and date) can be on a separate cover sheet or as (highlighted) comments at the top of your main program file.
9. (1 point if done) Document the Extra Credit part of your program if you did it (by coded/hand-written comments and highlighting -- as usual).
11. (5 points) Include the program listings. This listing should show good style, be appropriately commented, have the important/new parts highlighted, and include handwritten explanations if it helps the reader's understanding of the code.
13./14. (9 points) Do a demo of your modified program for the TA that demonstrates that the program works correctly.


Page URL: http://www.d.umn.edu /~ddunham/cs5551f12/assignments/lab7/assignment.html
Page Author: Doug Dunham
Last Modified: Monday, 26-Nov-2012 17:02:01 CST
Comments to: ddunham@d.umn.edu