public void dispatch(URL URL, PropertyValue[] Arguments) {
try {
XMultiComponentFactory smgr = UnoRuntime.queryInterface(
XMultiComponentFactory.class, context.getServiceManager());
XMessageBox box = UnoRuntime.queryInterface(
XMessageBoxFactory.class,
smgr.createInstanceWithContext(
"com.sun.star.awt.Toolkit", context)).
createMessageBox(
UnoRuntime.queryInterface(
XWindowPeer.class,
(UnoRuntime.queryInterface(
XDesktop.class,
smgr.createInstanceWithContext(
"com.sun.star.frame.Desktop", context)).
getCurrentFrame().getComponentWindow())),
new Rectangle(), "infobox", MessageBoxButtons.BUTTONS_OK,
"active", "java");
box.execute();
UnoRuntime.queryInterface(XComponent.class, box).dispose();
} catch (com.sun.star.uno.RuntimeException e) {
throw e;
} catch (com.sun.star.uno.Exception e) {
throw new WrappedTargetRuntimeException(