title: JButton hover animation in Java Swing
body: <p>I working on GUI window with Swing and I want to create a navegetion menu. I want to add an animation to the navegetion menu's buttons when hovering on them with the mouse.</p>
  
  <p>Somthing like this:</p>
  
  <p><a href="https://i.stack.imgur.com/M4fQT.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M4fQT.gif" alt="enter image description here"></a></p>
  
  <p>I can't do it with mouse listener because it just change between colors without animation like so</p>
  
  <p><a href="https://i.stack.imgur.com/yXTK5.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yXTK5.gif" alt="enter image description here"></a></p>
  
  <p>With rolloving it require gifs and different screens sizes will require different gif sizes.</p>
  
  <p>Is there a way to do it some how throw the code?</p>