public Object getSelectedItem(Object component) {
		String classname = getClass(component);
		if ((classname == "combobox") || (classname == "tabbedpane")) {
			int index = getInteger(component, "selected",
				(classname == "combobox") ? -1 : 0);
			return (index != -1) ? getItemImpl(component, ":comp", index) : null;
		}
		if ((classname == "list") || (classname == "table") || (classname == "tree")) {
			for (Object item = findNextItem(component, classname, null); item != null;
					item = findNextItem(component, classname, item)) {
				if (getBoolean(item, "selected", false)) { return item; }
			}
			return null;
		}
		throw new IllegalArgumentException(classname);
	}