if (form==null) return;
List boxes=form.getBoxes();
if (boxes==null||boxes.size()==0){
return;
}
FormBoxLayout formBoxLayout=form.getLayout(zoom);
FormLayout layout = new FormLayout(
formBoxLayout.getColumnGrid(),
formBoxLayout.getRowGrid());
DefaultFormBuilder builder = new DefaultFormBuilder(this,layout);
if (formBoxLayout.getBorder()==null) builder.setDefaultDialogBorder();
else builder.setBorder(Borders.createEmptyBorder(formBoxLayout.getBorder()));
CellConstraints cc = new CellConstraints();
for (Iterator i=boxes.iterator();i.hasNext();){
FormBox box=(FormBox)i.next();
if (zoom<box.getMinZoom()) return;
JComponent component;
if(box.getFieldId()==null) component=new JLabel(Messages.getString(box.getTextId()));
else{
if (editor&&!box.getField().isReadOnly()){
component=new ChangeAwareTextField();
component.setBorder(null);
//component.setOpaque(false);
}else component=new JLabel();
//if (box.getRow()==1&&!editor) ((JLabel)component).setHorizontalAlignment(SwingConstants.CENTER);
//bug workaround, not possible to center with classic method when rowSpan>1
fieldComponents.put(box.getFieldId(),component);
}
Font font=formBoxLayout.getFont(box.getFont());
if (font!=null) component.setFont(font);
builder.add(component,(box.getAlignment()==null)?
cc.xywh(box.getColumn(),box.getRow(),box.getColumnSpan(),box.getRowSpan()):
cc.xywh(box.getColumn(),box.getRow(),box.getColumnSpan(),box.getRowSpan(),box.getAlignment()));
}