code: public Container getTargetScreen(Container component, Class<?> targetClass, boolean bComponent)
      {
          Container container = null;
          if (bComponent)
              if (component == this)
                  if (m_parent instanceof Container)
          {
              bComponent = false;
              container = (Container)m_parent;
          }
          if (container == null)
              container = component.getParent();
          if (container == null)
              return null;
          if (targetClass.isAssignableFrom(container.getClass()))
              return container;
          if (container instanceof JBasePanel)
              return ((JBasePanel)container).getTargetScreen(container, targetClass, true);
          return this.getTargetScreen(container, targetClass, bComponent);
      }
docs: Climb up through the panel hierarchy until you find a component of this class.
  @param component The (non-inclusive) component to start climbing up to find this class.
  @param targetClass The class type to find (or inherited).
  @param bComponent If false, don't climb the m_parent component. (To keep from unending recursion)
  @param bComponent If true, climb both m_parent and the component's parent.
  @return The first parent up the tree to match this class (or null).