I don't understand why when I use surface.setResizable(true); my draw stops working.

Hello @Nokuraion,

Your draw() is working! Windows 10 and Processing 4.3 used here.

For each cycle of draw() you are:

  • drawing a circle with a fixed size and location painting over the last one
  • updating i and printing it to the console. This means it is working!

An excellent resource for beginners:

There are also resources (tutorials, references, examples, etc.) here:

I suggest you look at the references for each element of your code; draw(), settings(), setup(), circle(), etc. and also some working examples from the references provided.

:)