XNameContainer xDialogModelContainer = (XNameContainer)
UnoRuntime.queryInterface(XNameContainer.class, xDialogModel);
xDialogModelContainer.insertByName( sTreeControlName, xTreeControlModel);
XControl xDialogControl = (XControl)
UnoRuntime.queryInterface(XControl.class,
mxMSF.createInstance("com.sun.star.awt.UnoControlDialog"));
xDialogControl.setModel( xDialogModel );
XToolkit xToolkit = (XToolkit) UnoRuntime.queryInterface(XToolkit.class,
mxMSF.createInstance("com.sun.star.awt.Toolkit" ));
xDialogControl.createPeer( xToolkit, null );
// get the peers of the sub controls from the dialog peer container
XControlContainer xDialogContainer = (XControlContainer)
UnoRuntime.queryInterface(XControlContainer.class ,xDialogControl);