title: How to have an background image and buttons on it in tkinter?
body: <p>I'm writing a simple Python 3 program using <code>tkinter</code>. it should display a background picture and a button.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import tkinter
  from PIL import Image
  from PIL import ImageTk
  
  window = tkinter.Tk()
  file = Image.open('/Users/dariushmazlumi/Desktop/p.jpg')
  img = ImageTk.PhotoImage(file)
  background = tkinter.Label(window, image=img)
  background.image = img
  background.pack()
  window.minsize(height=window.winfo_height(), width=window.winfo_width())
  number = 0
  def buttonclicked():
      global number
      number = number+1
      button.configure(text=number)
  button = tkinter.Button(window, text=0, command=buttonclicked)
  button.grid(column=1, row=1)
  window.mainloop()
  </code></pre>
  
  <p>Prior to this, I tried using <code>button.pack()</code>, but it shows button under the image, not on it(maybe the image is not background).</p>
  
  <p>Next, I tried using <code>button.grid()</code>. It runs on the terminal with no error, but no visible output! It just runs. I don't know why. </p>
  
  <p>I want my program to display an image and buttons on it (like a desktop for example).</p>