import tkinter as tk # Python 3.8.3 class Application(tk.Frame): def __init__(self, master=None): self.canvas = None self.quit_button = None tk.Frame.__init__(self, master) self.grid() self.create_widgets() def create_widgets(self): self.canvas = tk.Canvas(self, width=500, height=420, bg='yellow') self.canvas.create_text(250, 200, font="* 180", text='\U0001F43F') self.canvas.grid() self.quit_button = tk.Button(self, text='Quit', command=self.quit) self.quit_button.grid() app = Application() app.master.title('Emoji') app.mainloop()