The information in this article applies to:
Attempting to call the following methods after hosting a WebBrowser control inside a Java application or applet fails:
public void BeforeNavigate2(Object pDisp, Variant URL, Variant Flags, ...); public void NewWindow2(Object[] ppDisp, boolean[] Cancel);
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
This bug was corrected in the Microsoft® virtual machine (Microsoft VM) contained in the SDK for Java 3.0, VM build 2829.
public void BeforeNavigate2(Object pDisp, Variant URL, Variant Flags, Variant TargetFrameName, Variant PostData, Variant Headers, boolean[] Cancel) { System.out.println("BeforeNavigate2"); } public void NewWindow2(Object[] ppDisp, boolean[] Cancel) { System.out.println("NewWindow2"); }
You can download all versions of the SDK for Java from the following Web site:
http://www.microsoft.com/java/
WebBrowser events java