Question: you will create a Java class that lets the user add shapes to a JPanel with a left-click, and remove them with a right-click. Your
you will create a Java class that lets the user add shapes to a JPanel with a left-click, and remove them with a right-click. Your Class should be implemented in a single Java file (ShapeClicker.java).the Shapes should be spawned upon LEFT CLICK. You may pick the shape he shape should appear centered on the mouse. If the user RIGHT CLICKS within the filled portion of a shape, that shape should disappear. The color of every shape should be different! Spice things up a bit. The background color can be Only 10 shapes are allowed on the screen at a time. Once there are 10 shapes, a LEFT CLICK should do nothing. Only when the user successfully removes a shape can they add another.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
