import tkinter
window = tkinter.Tk()
window.title("My first GUI Program")
window.minsize(width=500, height=300)
#Label
my_labal = tkinter.Label(text="I Am a Label", font=("Arial", "24", "bold"))
my_labal.pack(side = "left")
#use the packer to pack our label onto the screen.
window.mainloop()
- pack(): #It's basically a geometry management system. It's just a simple way to lay out the components that you're building.
- window.mainloop(): always has to be at the very end of your program and all the rest of the things that you're going to write go in between creating the window and getting the window to run.