side they were givenunless they are positioned with anchor or stretched with fill to demonstratechange gui to use this sort of codebutton(wintext='hello'command=greetingpack(side=leftanchor=nlabel(wintext='hello container world'pack(side=topbutton(wintext='quit'command=win quitpack(side=rightthe only thing new here is that the hello button is anchored to the north side of its space allocation because this button was packed firstit got the entire left side of the parent frame this is more space than is needed to show the buttonso it shows up in the middle of that side by defaultas in figure - ( anchored to the centersetting the anchor to moves it to the top of its sideas shown in figure - figure - anchoring button to the north keep in mind that fill and anchor are applied after widget has been allocated cavity side space by its sidepacking orderand expand extra space request by playing with packing orderssidesfillsand anchorsyou can generate lots of layout and clipping effectsand you should take few moments to experiment with alternatives if you haven' already in the original version of this examplefor instancethe label spans the entire top side just because it is the first packed as we'll see laterframes can be nested in other framestooin order to make more complex layouts in factbecause each parent container is distinct space cavitythis provides sort of escape mechanism for the packer cavity algorithmto better control where set of widgets show upsimply pack them within nested subframe and attach the frame as package to larger container row of push buttonsfor examplemight be easier laid out in frame of its own than if mixed with other widgets in the display directly finallyalso keep in mind that the widget tree created by these examples is really an implicit onetkinter internally records the relationships implied by passed parent widget arguments in oop termsthis is composition relationship--the frame contains label and buttons let' look at inheritance relationships next customizing widgets with classes you don' have to use oop in tkinter scriptsbut it can definitely help as we just sawtkinter guis are built up as class-instance object trees here' another way python' graphical user interfaces