It seems like you're confusing inheritance and encapsulation here. Your App class is inheriting from Tk, which means it IS a Tk. However, you're also encapsulating a Tk object inside App and assigning it to self.root. So you've got App, which is a subclass of Tk, encapsulating App.root, which is also a Tk.
You're actually building your GUI on the self.root Tk instance, but then you're also calling Tk.__init__(self)
, which is initializing a blank Tk object (hence the second window). You need to pick one approach or the other; either (1) Don't inherit from Tk, don't call Tk.__init__(self)
, and just use self.root, or (2) Don't create a self.root
object at all, call Tk.__init__(self)
, and simply use self
everywhere you're currently using self.root
.