XPropertySet xICModelPropertySet = oImageControlSample.insertImageControl(xMCF, 68, 30, 32, 90);
oImageControlSample.insertButton(oImageControlSample, 90, 75, 50, "~Close dialog", (short) PushButtonType.OK_value);
oImageControlSample.createWindowPeer();
// note: due to issue i76718 ("Setting graphic at a controlmodel required dialog peer") the graphic of the image control
// may not be set before the peer of the dialog has been created.
XGraphic xGraphic = oImageControlSample.getGraphic(oImageControlSample.m_xMCF, args[0]);
xICModelPropertySet.setPropertyValue("Graphic", xGraphic);
oImageControlSample.xDialog = (XDialog) UnoRuntime.queryInterface(XDialog.class, oImageControlSample.m_xDialogControl);
oImageControlSample.executeDialog();
}catch( Exception e ) {
System.err.println( e + e.getMessage());