1.There is a menu bar. One menu item “File” will pull down a list for opening and saving to a file using JFileChooser or for exiting the application. The file can be stored as an object file or an image file. For an object file, take advantage of ObjectInputStream and ObjectOutputStream. For an image file, take advantage of ImageIO.
2.There is a tool bar that allows users to perform same functions as menu bar items, such as open a file, save a file, and so on. Please use self-developed icons.
3.The program allows users to draw ovals, rectangles, lines, and freehand. Users can also fill ovals and rectangles. The freehand is like a pencil that users can freely drag the mouse to draw a curve.
4.The program accepts different line widths and a line can be a dashed line. (Hint: take advantage of the setStroke(Stroke) method of Graphics2D.
5.The program allows users to place texts on the canvas.
6.The program allows users to change colors for drawing.
7.The program allows users to do two colors Gradient Paint and user selected texture for texture paint. Provide an option for the gradient to be either cyclic or acyclic.
8.The program allows users to set up a 0~1 alpha value to draw transparent shapes.
9.The program allows users to print the drawing to a selected printer.
- Draw the UML class diagram for your design. Please only show the classes and attributes that you made. For classes created by the tool, e.g., NewJFrame, only the class names need to be shown.