the bounds of the square is a rectangle.
the rectangle class has a method contains(Point).
from mousePressed() you can get the point clicked.
if the rectangle contains the point clicked, the square
has been 'clicked'
Don't get me started about those stupid light bulbs.