Ive created a memory game which has a grid of JButtons, when the button is clicked it changes the ImageIcon background to an animation which shows the front of the card.
The problem is that when the button is clicked, the gif doesn't begin playing until the mouse is moved off the button and if the mouse is moved back on before the animation is finished it causes the animation to restart. Has anyone encountered this problem before? Or can think of a workaround.
thanks