changed the frame's position to the middle of the screen