* @param clazz the class to look for, or if assignable from.
* @return the component if found, <tt>null</tt> if not.
*/
protected Component findAncestor(Class clazz) {
Stack componentStack = getComponentStack();
int currPosition = componentStack.search(this);
if (currPosition >= 0) {
int start = componentStack.size() - currPosition - 1;
//for (int i = componentStack.size() - 2; i >= 0; i--) {
for (int i = start; i >=0; i--) {