[Java]How to get java.awt.Component from OOo Window?

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
hawkx
Posts: 12
Joined: Wed Mar 25, 2009 2:23 am

[Java]How to get java.awt.Component from OOo Window?

Post by hawkx »

According to OOo API references, I could get a system-specific window handle from XSystemDependentWindowPeer.getWindowHandle, for java.awt.Component object, using com.sun.star.lang.SystemDependent.SYSTEM_JAVA as value of "SystemType" parameter.
Actually, I can get Windows window handle when using com.sun.star.lang.SystemDependent.WIN32, but every time I using com.sun.star.lang.SystemDependent.SYSTEM_JAVA, it returns <Empty>.
How to get java.awt.Component object from OOo window? Or it was impossible?

My purpose was to show a Swing modal dialog in OOo, I also kown that I can show a OOo modal dialog while my non-modal dialog running, but it was not the test.

Thanks in any advice.
OOo 3.0.X on Ms Windows XP
Post Reply