I'm trying to make a GUI with Python 3.5, but it gives me an error:
Traceback (most recent call last): File "C: \ Users \ Juan \ Desktop \ Python \ GUI_test.py", line 2, in class Application (Frame): File "C: \ Users \ Juan \ Desktop \ Python \ GUI_test.py", line 13, in Application root = Tkinter.Tk () NameError: name 'Tkinter' is not defined
Here the script:
from tkinter import *
class Application(Frame):
def __init__(self,master=None):
Frame.__init__(self,master)
self.grid()
self.create_widgets()
def create_widgets(self):
self.myButton = Button(self, text='Button Label')
self.myButton.grid()
root = Tkinter.Tk()
root.title('Frame w/ Button')
root.geometry('200x200')
app = Application(root)
root.mainloop()
How can I solve this?