if (form == null) {
form = new XhtmlForm(uac, parentForm, formSubmissionListener);
addForm(parentForm, form);
}
FormField formField = form.addComponent(e, context, box);
if (formField == null) {
return null;
}
JComponent cc = formField.getComponent();
if (cc == null) {
return new EmptyReplacedElement(0, 0);
}
SwingReplacedElement result = new SwingReplacedElement(cc);
result.setIntrinsicSize(formField.getIntrinsicSize());
if (context.isInteractive()) {
((Container) context.getCanvas()).add(cc);
}
return result;