// create a unique name by means of an own implementation...
String sName = createUniqueName(m_xDlgModelNameContainer, "NumericField");
// create a controlmodel at the multiservicefactory of the dialog model...
Object oNFModel = m_xMSFDialogModel.createInstance("com.sun.star.awt.UnoControlNumericFieldModel");
XMultiPropertySet xNFModelMPSet = (XMultiPropertySet) UnoRuntime.queryInterface(XMultiPropertySet.class, oNFModel);
// Set the properties at the model - keep in mind to pass the property names in alphabetical order!
xNFModelMPSet.setPropertyValues(
new String[] {"Height", "Name", "PositionX", "PositionY", "Spin", "StrictFormat", "Width"},
new Object[] { new Integer(12), sName, new Integer(_nPosX), new Integer(_nPosY), Boolean.TRUE, Boolean.TRUE, new Integer(_nWidth)});
// The controlmodel is not really available until inserted to the Dialog container
m_xDlgModelNameContainer.insertByName(sName, oNFModel);