There are several ways to add containers to a diagram. By selecting elements and pressing Group on the context menu, or by pulling off containers from the chooser (shown below).
Having added a container, it is possible to change the container layout, by choosing the “layout” option from the context menu as seen here:
You can then choose a new layout from the popup window:
If I choose “Top To Bottom”, the diagram will redraw like this:
Changing The Order
With a layout specified, you can re-order the contents of the container by dragging the elements around inside it. The blue bar shows the new position the element will have, and gives you a visual clue that the container has a layout set.