return f;
}
private void addFields(ComponentContainer lo) {
Button button = new Button("Test button");
button.setComponentError(new SystemError("Test error"));
lo.addComponent(button);
CheckBox b2 = new CheckBox("Test button");
b2.setComponentError(new SystemError("Test error"));
lo.addComponent(b2);
TextField t1 = new TextField("With caption");
t1.setComponentError(new SystemError("Error"));
lo.addComponent(t1);
TextField t2 = new TextField("With caption and required");
t2.setComponentError(new SystemError("Error"));
t2.setRequired(true);
lo.addComponent(t2);
TextField t3 = new TextField();
t3.setValue("Without caption");
t3.setComponentError(new SystemError("Error"));
lo.addComponent(t3);
lo.addComponent(new TextField("Textfield with no error in it"));
TextField tt1 = new TextField("100% wide Textfield with no error in it");
tt1.setWidth("100%");
lo.addComponent(tt1);
TextField tt2 = new TextField();
tt2.setWidth("100%");
tt2.setValue("100% wide Textfield with no error in it and no caption");
lo.addComponent(tt2);
TextField t4 = new TextField();
t4.setValue("Without caption, With required");
t4.setComponentError(new SystemError("Error"));
t4.setRequired(true);
lo.addComponent(t4);
TextField t5 = new TextField();
t5.setValue("Without caption, WIDE");
t5.setComponentError(new SystemError("Error"));
t5.setWidth("100%");
lo.addComponent(t5);
TextField t6 = new TextField();
t6.setValue("Without caption, With required, WIDE");
t6.setComponentError(new SystemError("Error"));
t6.setRequired(true);
t6.setWidth("100%");
lo.addComponent(t6);
TextField t7 = new TextField();
t7.setValue("With icon and required and icon");
t7.setComponentError(new SystemError("Error"));
t7.setRequired(true);
t7.setIcon(new ThemeResource("../runo/icons/16/ok.png"));
lo.addComponent(t7);
DateField d1 = new DateField(
"Datefield with caption and icon, next one without caption");
d1.setComponentError(new SystemError("Error"));
d1.setRequired(true);
d1.setIcon(new ThemeResource("../runo/icons/16/ok.png"));
lo.addComponent(d1);
DateField d2 = new DateField();
d2.setComponentError(new SystemError("Error"));
d2.setRequired(true);
lo.addComponent(d2);
}