- Frame() Tkinter widget is very important for the process of grouping and organizing other widgets. It works like a container, and content in one Frame do not affects the other Frame content.
-It uses rectangular areas in the screen to organize the layout and to provide padding of these widgets. A frame can also be used as a foundation class to implement complex widgets.
from tkinter import *
#create a window screen
#create a two Frame
#create a First Label
l1=Label(f1,text="Text in First Frame",bg="red",font=('',20,'bold'))
#create a second label
l2=Label(f2,text="Text in Second Frame",bg="blue",font=('',15,'bold'))
#hold the screen
-In this program, we initially create a window screen by win=Tk() and hold the screen by win.mainloop() in the last.
-Then we create a two Frame, f1 and f2 are the object of that frames, then we put different labels in different Frames so that each Frame treated as single Unique entity.