code: public XTextComponent addTextField(String content, String name, int x,
              int y, int width, int height) throws Exception {
          Object labelModel = multiServiceFactory.createInstance("com.sun.star.awt.UnoControlEditModel");
          XPropertySet textFieldProperties = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, labelModel);
          textFieldProperties.setPropertyValue("PositionX", new Integer(x));
          textFieldProperties.setPropertyValue("PositionY", new Integer(y));
          textFieldProperties.setPropertyValue("Width", new Integer(width));
          textFieldProperties.setPropertyValue("Height", new Integer(height));
          textFieldProperties.setPropertyValue("Name", name);
          textFieldProperties.setPropertyValue("TabIndex", new Short(
                  (short) tabcount++));
          textFieldProperties.setPropertyValue("MultiLine", new Boolean(false));
          textFieldProperties.setPropertyValue("Text", content);
  
          // insert the control models into the dialog model
          this.nameContainer.insertByName(name, labelModel);
  
          XControlContainer controlContainer = (XControlContainer) UnoRuntime.queryInterface(XControlContainer.class, this.oUnoDialog);
          Object obj = controlContainer.getControl(name);
          XTextComponent field = (XTextComponent) UnoRuntime.queryInterface(
                  XTextComponent.class, obj);
  
          return field;
      }
docs: Create a single line textfield with the given content.
  
  @param content
  @param name
  @param x
  @param y
  @param width
  @param height
  @return
  @throws Exception