I'm trying to create a burst on the screen by running through an image array. As a test I created 3 gif images named One, Two, and Three (each one displays the associated number). The problem is, there is no way to view each image in the array; the only image that is viewable by the human eye is the last one in the array (but each one is viewable if it is selected alone). Does anyone have any advice/links on a solution to this? Been googling this and can't find much help. My code is below.
burst = new BufferedImage[3];
try
{
burst[0] = ImageIO.read(getClass().getResource("images\\one.gif"));
burst[1] = ImageIO.read(getClass().getResource("images\\two.gif"));
burst[2] = ImageIO.read(getClass().getResource("images\\three.gif"));
//burst[3] = ImageIO.read(getClass().getResource(".gif"));
//burst[4] = ImageIO.read(getClass().getResource(".gif"));
//burst[5] = ImageIO.read(getClass().getResource(".gif"));
//burst[6] = ImageIO.read(getClass().getResource(".gif"));
//burst[7] = ImageIO.read(getClass().getResource(".gif"));
//burst[8] = ImageIO.read(getClass().getResource(".gif"));
//burst[9] = ImageIO.read(getClass().getResource(".gif"));
}catch (Exception ex){System.out.println("Invalid Image");}
for(int i = 0; i < burst.length; i ++)
{
for(int t = 0; t < 100; t ++)
{
g2d.drawImage((BufferedImage)burst[i], 150, 150, null);
}
}