Problems with file dir

I did read some articles about security and I am aware of that issue concerning applets. I wrote a small slide show application for use on my web-side. Photos are present in a file folder called Imagestore and the applet should look for them on the server and download the content of the folder into the applet (I AM NOT TRYING TO ENTER A CLIENT ENVIRONMENT). The method (see bottom) reads simply the file directory of the file Imagestore and stores it into an array, which I copy into an image array for display. The application version works perfect but not the applet. The problem is the following method (when left out, the applet works okay). I do not understand which security issue is involved here. The panes should give me some feedback but they dont.... the applet refuses to popup and I do not know way?


private void readImageFilelist(String dirname) { // gets the list of images
directory = new File(dirname);
if (directory.isDirectory() == false) {
if (directory.exists() == false)
JOptionPane.showMessageDialog(infoPane," there is no directory called " + directory);
JOptionPane.showMessageDialog(infoPane, directory + " is not a directory.");
else {
JOptionPane.showMessageDialog(infoPane, directory + " it works");
files = directory.list(); // stores the list of file names
Imagearray = new Image[files.length];
for (int i = 0; i < files.length; i++) {
String str = files[i];
Imagearray[i] = downloadImage(str); // stores each image in a array for display



and for display

public void paintComponent(Graphics g) {

if (Imagearray != null) {
if (count==Imagearray.length)
count = 0;
g.drawImage(Imagearray[count],0,0,getWidth(), getHeight(), this);
g.drawImage(testimage,0,0,getWidth(), getHeight(), this);