This method of the WebBrowser class retrieves a Boolean value that indicates whether Microsoft® Internet Explorer is the top-level container of the WebBrowser control.
public synchronized boolean getTopLevelContainer();