Event and Drawing question...

I am trying to practice both drawing and mouse event methods in Java. I am attemtping to make a program that creates a 10x10 grid, and whenever the user clicks inside one of the squares created by the grid, I want the click event to turn that square black.

However, I am at a lost of how to even begin to handle the click event. How to I code so that the event only fills in that particular area? How does Java know that is the sqaure I want filled? Should I draw the grid with lines, or use rectangles and position them?

[534 byte] By [DefStatica] at [2007-10-2 12:33:22]
# 1
Never mind, suppose I should have done a lot more searching... I found this... http://forum.java.sun.com/thread.jspa?threadID=610965&messageID=3359872
DefStatica at 2007-7-13 9:32:54 > top of Java-index,Security,Event Handling...