Question: Assignment: This lab is designed to help students with painting shapes and with timer usage. Write code that does the following: Make a simple GUI
Assignment: This lab is designed to help students with painting shapes and with timer usage.
Write code that does the following: Make a simple GUI with a single panel in the center, a panel called DrawablePanel o DrawablePanel must implement the paintComponent method Give the GUI a JMenuBar The first JMenu on the menu bar should be the File menu o It has two options a checkbox called Rotate and an item called Exit The second JMenu should be the Animal menu o It should have three radio buttons, each of which is a different animal When the user selects a radio button, draw that simple animal on the DrawablePanel If the user selects Rotate from a file menu, start a timer that loops through each of the other three animals in a sequence, changing the animal every 3 seconds. Make sure to change the radio button selected in the animal menu as well, to change alongside the animal on the panel. If Rotate is deselected, the timer should stop Exit does what you think it should All menu items should have proper hotkeys established (make sure a letter is underlined in the name of the item!)
Notes You will not be graded on how well you can draw using paintComponent, but on how much heart your drawings have
Example GUI
The default state of the GUI, showing off the Animal menu (you do not need to match the animals shown)

The File menu shown, with Dolphin selected from Animals (note this Dolphin was drawn by a former student and was too nice for me not to use as the example)

File Animals O Dolphin Elephant O Cat
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
