Hi, I'm trying to make a square grid of circles (ex: 3x3, 5x5) using a for loop.

for(int i=1; i<=Lines; i++){
g.setColor (Color.RED);
g.fillOval(x+(SIZE*i/(Lines+1)),y+(SIZE/(Lines+1)),4,4);
}

This loop creates only a single row of circles. I'm at a loss as to how to modify this to create an entire grid of circles.
Any help is appreciated, thanks