title: Button image not appearing in tkinter
body: <p>I'm new to tkinter and am running python 3.4.2 with Tk version 8.5.17 using IDLE 3.4.2 under Yosemite. This is a modified demo from Liang's book <em>Introduction to Programming Using Python 3</em>. I was expecting the following code to display four buttons:   </p>
  
  <pre><code>from tkinter import *
  
  class ButtonsDemo:
      def __init__(self):
          window = Tk()
          window.title("Buttons Demo")
  
          frame0 = Frame(window)  
          frame0.pack()
  
          plusImage = PhotoImage(file = "image/plus.gif")
          minusImage = PhotoImage(file = "image/minus.gif")
          timesImage = PhotoImage(file = "image/times.gif")
          divideImage = PhotoImage(file = "image/divide.gif")
  
          Button(frame0, image = plusImage, command =
                   self.add).grid(row = 1, column = 1, sticky = W)
          Button(frame0, image = minusImage, command =
                   self.subtract).grid(row = 1, column =2)
          Button(frame0, image = timesImage, command =
                   self.multiply).grid(row = 1, column = 3)
          Button(frame0, image = divideImage, command =
                   self.divide).grid(row = 1, column = 4)
          window.mainloop()
  
      def add(self):
           print("add pressed")
  
      def subtract(self):
           print("subtract pressed")
  
      def multiply(self):
           print("multiply pressed")
  
      def divide(self):
           print("divide pressed")
  
  ButtonsDemo()
  </code></pre>
  
  <p>When I run the code, only the first three buttons are displayed.  The button with divideImage on it does not appear. </p>
  
  <p>If I click where the divide button should be, I do get the message "divide pressed".  It's as if the button is there, but it's invisible.  </p>
  
  <p>I see the same behavior running the program from the command line 
  instead of from IDLE.  </p>
  
  <p>There's nothing wrong with the gif. If I use divide.gif for plusImage, I can see divide.gif in the first button position.  Also, when I put <code>text = "Divide"</code> on the divide button instead of <code>image = DivideImage</code>, the button becomes visible. </p>
  
  <p>Why is the divide button invisible when I use an image?  How can I fix it?  </p>
  
  <p>EDIT:   Here's the code with everything moved to the main program.   I think this should have fixed a garbage collection problem if there were one.  Is this correct? </p>
  
  <pre><code>from tkinter import *
  
  def add():
           print("add pressed")
  
  def subtract():
       print("subtract pressed")
  
  def multiply():
       print("multiply pressed")
  
  def divide():
       print("divide pressed")
  
  
  window = Tk()
  window.title("Buttons Demo")
  frame0 = Frame(window)  
  frame0.pack()
  
  plusImage = PhotoImage(file = "image/plus.gif")
  minusImage = PhotoImage(file = "image/minus.gif")
  timesImage = PhotoImage(file = "image/times.gif")
  divideImage = PhotoImage(file = "image/divide.gif")
  
  Button(frame0, image = plusImage, command =
               add).grid(row = 0, column = 0, sticky = W)
  Button(frame0, image = minusImage, command =
               subtract).grid(row = 0, column = 1)
  Button(frame0, image = timesImage, command =
               multiply).grid(row = 0, column = 2)
  
  Button(frame0, image = divideImage, command =
               divide).grid(row = 0, column = 3)
  
  window.mainloop()
  </code></pre>