public int readPackage(int depth, HashMap classes, String packageName,
			int count) {
		if (depth++ >= MAX_PACKAGE_LEVEL)
			return count;
		String prefix = packageName.length() == 0 ? "" : packageName + ".";
		Enumeration enum_ = ClassInfo.getClassesAndPackages(packageName);
		while (enum_.hasMoreElements()) {
			// insert sorted and remove double elements;
			String name = (String) enum_.nextElement();
			String fqn = prefix + name;
			if (ClassInfo.isPackage(fqn)) {
				count = readPackage(depth, classes, fqn, count);
			} else {
				TreeElement elem = handleClass(classes, ClassInfo.forName(fqn));
				if (progressBar != null)
					progressBar.setValue(++count);

				elem.inClassPath = true;
			}
		}
		return count;
	}