Hi,
Back on the JDK 1.3 days you could grab a HWND reference in Windows to display a Internet Explorer window within your java GUI, using the following (along with other native methods):
public int getHWND() {
DrawingSurfaceInfo drawingSurfaceInfo;
Win32DrawingSurface win32DrawingSurface;
int hwnd = 0;
drawingSurfaceInfo =
((DrawingSurface)(getPeer())).getDrawingSurfaceInfo();
if (null != drawingSurfaceInfo) {
drawingSurfaceInfo.lock();
win32DrawingSurface =
(Win32DrawingSurface)drawingSurfaceInfo.getSurface();
hwnd = win32DrawingSurface.getHWnd();
drawingSurfaceInfo.unlock();
}
return hwnd;
}
Now, as of the JDK 1.5, classes such as the DrawingSurfaceInfo and Win32DrawingSurface no longer exist. Does anyone know of an approach that would replace the above code? By the way, the code is not mine, and I’m trying to achieve what is described here: http://www.codeproject.com/java/javacom.asp
I need to open a Internet Explorer window within a Java GUI, with all activeX controls enabled. I cannot simply call IE to start outside the application, it HAS to be within a JPanel… =/