Reize the frame to just fit around the subwindows. If a frame has only one subwindow, that subwindow will be resized by the default on-size method to fit inside the frame.