I wanted to draw a field like this photo which I have attached. I would appreciate your help.
I have wrote so much now:

for (int x = 2; x < 12; x++) {
    for (int y = 2; y <= 12; y++) {
        g.drawRect(40*x, 40*y, 40, 40);


That's a good start.
You will need to draw the pairs of boxes at the top and the bottom separately

Yes but those boreders shoud be thiker, don't know how to draw them.

Just draw those 12 lines one a time. Tedious, but not difficult.