I have 2 coordinates (X,Y). I have also a 10x10 array. By these coordinates I have to find the rectangle in which is my pointer at the moment. How could I handle it?
If your grid array is displayed as a Rectangle(ox,oy, 10*CELL_SIZE, 10*CELL_SIZE), where (ox,oy) is an offset...
then the cell coords are
of course you should check the coords are in right range (0..9,0..9)