For my homework, I have to create a widget. I'm very new to this. I'm trying to get my buttons to show up. I have tried packing them, but I don't know what I'm doing wrong. Here is what I have.
from tkinter import *
import turtle
main = Tk()
main.title("TurtleApp")
class turtleApp:
def __init_(self):
self.main = main
self.step = 10
self.turtle = turtle.Turtle()
self.window = turtle.Screen()
self.createDirectionPad
def createDirectionPad(self):
mainFrame = Frame(main)
mainFrame.pack()
button1 = Button(mainFrame,text = "left", fg="red")
button2 = Button(mainFrame,text = "right", fg="red")
button3 = Button(mainFrame,text = "up", fg="red")
button4= Button(mainFrame,text = "down", fg="red")
button1.pack()
button2.pack()
button3.pack()
button4.pack()
main.mainloop()