Supporting Top-Level Objects
If you want UFT One to recognize the custom control as the highest Java object in the test object hierarchy, you need to inform UFT One that this Java control is a top-level object. You do this by overriding the utility method isWindow(Object obj) in the support class to return true. In the following example, the JavaApplet AllLights is a top-level Java object.
Only a container object can be a top-level object. A container object is one that extends java.awt.container if it is AWT-based, or org.eclipse.swt.widgets.Composite if it is SWT-based.
If the control is a top-level object only in some situations, you can implement the isWindow method to return true in some situations and false in others. For example, an applet can be a standalone application or an object within a Web browser.
See also: