why this code dont work?
import tkinter
class GraphicChessBoard(tkinter.Frame):
def __init__(self,parent,squaresCountWidth=8,squaresCountHeight=8,squaresSize=64):
tkinter.Frame.__init__(self, parent)
parent.geometry("500x500")
self.Canvas = tkinter.Canvas(parent,width = 500,height = 500,borderwidth=3)
self.Canvas.pack()
img = tkinter.PhotoImage(file = "king.png")
self.Canvas.create_image(100,100,image = img)
a = tkinter.Tk()
b = GraphicChessBoard(a)
a.mainloop()
this is just some simple code that shows my problem. main problem is showing images on canvas, when there are rectangles drew on this canvas. i need images to be on top of my canvas