/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Events;

import Items.Sprite;
import Items.Storage;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

/**
 *
 * @author 160289
 */
public class second extends JPanel implements ActionListener{
    private Timer animator;
   // private ImageIcon image;
    private int delay = 50, totalframe = 2, currentFrame;
    private Sprite s = new Sprite(4,5);
    private ImageIcon[] images;
    
    public second(){
        for(int i = 0; i<images.length; i++){
            images[i] = new ImageIcon("frame"+i+".jpg");
        } // 3.24 sconds on vid (https://www.youtube.com/watch?v=JyVguDOXCuM&t=99s)
    }
    
    
}

@@ -505,86 +505,119 @@
 = 50
-, totalframe = 2, currentFrame;%0D%0A    private Sprite s = new Sprite(4,5
+;%0D%0A    private ImageIcon image;%0D%0A%0D%0A    %0D%0A    public second()%7B%0D%0A        animator = new Timer(delay, this
 );%0D%0A    
 priv
@@ -616,122 +616,193 @@
     
+ 
-private ImageIcon%5B%5D images;%0D%0A    %0D%0A    public second()%7B%0D%0A        for(int i = 0; i%3Cimages.length; i++)%7B%0D%0A  
+   animator.start();          %0D%0A    %7D%0D%0A    %0D%0A    @Override%0D%0A    public void paintComponent(Graphics g)%7B%0D%0A        super.paintComponent(g);%0D%0A        Sprite s = new Sprite(4,5);%0D%0A
         
   im
@@ -801,19 +801,13 @@
     
-  
 image
-s%5Bi%5D
  = n
@@ -824,110 +824,243 @@
 on(%22
-frame%22+i+%22.jpg%22);%0D%0A        %7D // 3.24 sconds on vid (https://www.youtube.com/watch?v=JyVguDOXCuM&t=99s)
+C:%5C%5CUsers%5C%5CMatthew%5C%5CPictures%5C%5Carrow-50x50-md.png%22);%0D%0A        image.paintIcon(this, g, (int) (Math.random() * 200),(int)(Math.random()*200));%0D%0A    %7D%0D%0A%0D%0A    @Override%0D%0A    public void actionPerformed(ActionEvent e) %7B %0D%0A        repaint();
 %0D%0A  
@@ -1070,17 +1070,13 @@
 %0D%0A    %0D%0A
-    
 %0D%0A%7D%0D%0A

Set Up