Program "crashes" when I setResizable(true) and resize the Window

you could also use windowResized() as it’s called when the window is resized

How did you use this? According to the documentation it doesn’t return anything:https://processing.org/reference/windowResized_.html