public Object getEmbeddedComponent(Class c, int n) {
		if (c == null)
			return null;
		if (getDocument() == null)
			return null;
		if (getDocument().getLength() <= 0)
			return null;
		AbstractDocument.BranchElement section = (AbstractDocument.BranchElement) getDocument().getDefaultRootElement();
		AbstractDocument.BranchElement paragraph;
		AbstractDocument.LeafElement content;
		Object name, attr;
		int index = 0;
		for (Enumeration i = section.children(); i.hasMoreElements();) {
			paragraph = (AbstractDocument.BranchElement) i.nextElement();
			for (Enumeration j = paragraph.children(); j.hasMoreElements();) {
				content = (AbstractDocument.LeafElement) j.nextElement();
				for (Enumeration k = content.getAttributeNames(); k.hasMoreElements();) {
					name = k.nextElement();
					attr = content.getAttribute(name);
					if (c.isInstance(attr)) {
						if (index == n)
							return attr;
						index++;
					}
				}
			}
		}
		return null;
	}