I'm making a slide show applet. I want to be able to have the user just put pictures into the designated folder and for java to go and randomly select one to use. Is there an easy way to do this or do I have to know what the file names are ahead of time.
File list = .....
You may have to read up on it, this is without looking at the actual call. It will show up correctly by just googling what I coded.
File list = (new File(".")).listFiles();
Or you could use the list() method with a filter to allow you to list only files that you think are images.
ok thanks I will try this out then when I finish the project I will post it here and sourceforge.