public static void setEnabled(Container c,
			HashMap<Component, Boolean> wasEnabled, Component[] notEdit) {
		List<Component> notEditList = null;
		if (notEdit != null && notEdit.length > 0) {
			notEditList = Arrays.<Component> asList(notEdit);
		} else {
			notEditList = new ArrayList<Component>();
		}

		Component[] comps = c.getComponents();
		for (Component comp : comps) {
			if (!notEditList.contains(comp)) {
				if (comp instanceof Container)
					setEnabled((Container) comp, wasEnabled, notEdit);
				if (wasEnabled.containsKey(comp))
					comp.setEnabled(wasEnabled.get(comp));
			}
		}
	}