Answered step by step
Verified Expert Solution
Question
1 Approved Answer
WRITE IN JAVA. Write an applet that displays a 4x4 grid(16 square). When the user clicks on square in the grid, the applet should draw
WRITE IN JAVA. Write an applet that displays a 4x4 grid(16 square). When the user clicks on square in the grid, the applet should draw a filled circle on it. If the square already has a circle, clicking on it should disappear.
All of this needs to be in one class.
Use the MouseListener
Also, write method mousePressed to update the user mouse clicks.
Use repaint method as well
ps, seen different answers on here, so please do not use previous answers.. old solutions do not work.
thank you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started