In my JFrame, I have a Container of JButtons in a grid. Each JButton has an icon assigned to it. When a button is pressed, it is assigned to a new JButton with a new icon. How do I get the GUI to change after the JButton variables are set to new values when clicked? I've tried putting this: right after I change the button, but when I click on the buttons, they appear to be unchanged.