This assignment asks you to build a realistic multi-window user interface that combines concepts of basic Swing programming with additional concepts of design guidelines and graphics.
All fields are required, and the program must check to see that the fields are not empty, and also that the numerical fields are integers. The "fill" information should be displayed with a check box. The "color" information should be a JComboBox with 5 options: black, blue, green, red, & yellow (please use the colors in the java Color class for these options).
Your system should be a multi-window application as follows. The main window (JFrame) should contain two main components: (1) a list of all shapes currently in the system, and (2) a graphics panel where all shapes are drawn. The list should be a JList where each line of the list is the text representation of the shape -- the text should match the examples above under each shape-field listing. The graphics panel should be a standard JPanel with a size (500,500), overriden such that the shapes in the list are drawn on the panel. Obviously, the positions, sizes, fills, and colors of each shape should be drawn correctly.
Also under the main list, there should be three buttons (like in A1): Add, Change, and Remove. When the user clicks Add, a new window (JDialog) should pop up with a tabbed pane with the various shapes (again like A1) as well as OK/Cancel buttons; if the user enters information and clicks OK, this shape is added to the list in the main window, but if the user clicks Cancel, the shape is not added. Similarly, the Change button pops up a new window where the current shape information is filled into the fields, allowing the using to change the information (with OK) or cancel the changes (with Cancel). The Remove button simply removes the shape from the list. In all cases, as soon as the shapes in the list are changed, the graphics panel should be redrawn to display the changes.
As in A1, you should not load any information from a file (or database) on startup or save the information upon quitting. Please ensure that the list is initially empty on startup of the program. You should also use proper object-oriented programming whenever possible, particularly in the classes that represent the shapes.
Your main class must be called "SimpleDraw" such that the program can be started by typing:
[One final note: The Color.toString() method gives debugging output, not the actual name of the color; here is a class ColorUtility.java which you may incorporate if you find it useful.]
/* * [Your Name] * [Your-Email] * CS338:GUI, Assignment [#], Program [#] */