There is a property: "layout" for "Frame" or "Panel".
The default value is border so you can add element into left/right/center...etc.
You can change layout to horizontal box, vertical box, FlowLayout or GridLayout (Rows/Columns).

Try to change the "Layout" and find out what happened to the element added into the partent element.