private boolean findFiles(String dirname) {
		
		File[] dir;
		File source = new File(dirname);

		if (!source.exists()) {
			JOptionPane.showMessageDialog(
				this,
				"Source directory",
				"The source directory does not exist.",
				JOptionPane.ERROR_MESSAGE,
				null);
			return false;
		}

		if (source.isFile()) {
			JOptionPane.showMessageDialog(
				this,
				"Source directory",
				"The source is a file. Please provide a directory!",
				JOptionPane.ERROR_MESSAGE);
			return false;
		}

		dir = source.listFiles(new FileFilter() {
			public boolean accept(File pathname) {
				if (pathname.isFile()) {
					if (!Pattern.matches("^\\..*", pathname.getName()) && Pattern
						.matches(
							"^.*(\\.JPG|\\.jpg|\\.jpeg)$",
							pathname.getName())) {
						return true;
					}
				} else if (pathname.isDirectory()) {
					return true;
				}
				return false;
			}

		});

		for (int i = 0; i < dir.length; i++) {

			if (dir[i].isFile()) {
				// Insert File in global list
				files.put(dir[i].getAbsolutePath(), dir[i]);

			} else if (dir[i].isDirectory()) {
				// If isDir then recurse into it
				findFiles(dir[i].toString());
			} else {
				message(
					"<HTML><i>I don't know what to do with: </i></html>"
						+ dir[i].getName());
			}
		}
			return true;
	}