public void startAnimation() {
   icon.setRunning(true);
   animator.start();
 }
 public void stopAnimation() {
   icon.setRunning(false);
   animator.stop();
 }
 @Override
 public void actionPerformed(ActionEvent e) {
   icon.next();
   repaint();
 }