Each GUI-based application
has the same structure, as shown in this template:
from breezypythongui
import EasyFrame
Other imports
class ApplicationName(EasyFrame):
def __init__(self, other arguments):
Add
window components to the window
Initialize other instance variables
Definitions of event handler
methods
ApplicationName().mainloop()
A GUI application window
is always represented as a class that extends EasyFrame. The __init__ method
initializes the window by setting its attributes and populating it with the
appropriate GUI components. The
event handler methods provide the responses of the application to user
events. The last line of code
always creates an instance of the application window class and runs the mainloop method on
this instance. The window then pops up and waits for
user events.