Processing/PApplet Show or hide a figure based on clicking the mouse
Hi guys. I am a newbie programmer and learning Java with processing.core.PApplet on Eclipse. The project visualizes Earthquakes/Majors Cities/Airports on the google Map. I created a "Control Window" which allows users to toggle on or off markers when they click the square box next to the text. Now my problem is, I want the "green check mark" to show inside the box when user clicks it and vanish when user clicks it again, but I don't know how to do it.
Note: The major methods I have are setUp() ,draw(), mouseClicked() and mouseMoved(). All text,rect, and the check mark was drawn in draw() method. I use the MouseClicked() method to check whether the location where the cursor clicked is inside the box.