place the array in the middle of the window