@sword117
The reason an exception is being thrown is because the app can't find a file named 00010.jpg. I would look to ensure that file exists. You should also surround your code with a try catch block so the exception can be properly handled.
-
try
-
{
-
//your code here
-
}
-
catch(FileNotFoundException ex)
-
{
-
//do something here ie report problem to user
-
}
-
Also I would have reservations about your code functioning at all. I am not sure, but I don't believe a repaint event will occur and you will only see the first and last image as the background image.
Also you should have some sort of timer to dictate how long each image stays on the screen. 30 frames a second is pretty standard.