Pane resizing and switching