I'm having a problem where i am making a simple combo box program that when it runs shows a pic, you can have a drop down box to select a different pic, very simple. I have an array for the file name of each, and a second array to store the pics themselves.
The error i am getting is "array out of bounds index 1" However i don't see how this can be happening.
THIS IS MY CLASS TO RUN IT
import javax.swing.JFrame;
public class apples
{
public static void main(String []args)
{
Gui go=new Gui();//New Gui object
go.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Closes the program
go.setSize(300,300);//Dimensions
go.setVisible(true);//Makes it visible
}
}