public static void setDisabled(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)) {
				wasEnabled.put(comp, comp.isEnabled());
				if (comp instanceof Container)
					setDisabled((Container) comp, wasEnabled, notEdit);
				comp.setEnabled(false);
			}
		}
	}