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

That does make more sense, do you have any ideas to fix it?