// Delivery fieldset
FieldSet deliveryFieldSet = new FieldSet("deliveryDetails");
form.add(deliveryFieldSet);
TextField addressToField = new TextField("addressedTo", true);
addressToField.setSize(30);
deliveryFieldSet.add(addressToField);
TextArea textArea = new TextArea("deliveryAddress", true);
textArea.setCols(30);
textArea.setRows(3);
deliveryFieldSet.add(textArea);
DateField dateField = new DateField("deliveryDate");
deliveryFieldSet.add(dateField);
PackagingRadioGroup radioGroup = new PackagingRadioGroup("packaging");
radioGroup.setValue("STD");
radioGroup.setVerticalLayout(true);
deliveryFieldSet.add(radioGroup);
deliveryFieldSet.add(new Checkbox("telephoneOnDelivery"));
// Payment fieldset
FieldSet paymentFieldSet = new FieldSet("paymentDetails");
form.add(paymentFieldSet);
paymentGroup = new RadioGroup("paymentOption", true);
paymentGroup.add(new Radio("cod", "Cash On Delivery "));
paymentGroup.add(new Radio("credit", "Credit Card "));
paymentGroup.setVerticalLayout(false);
paymentFieldSet.add(paymentGroup);
cardHolder = new TextField("cardHolderName");
paymentFieldSet.add(cardHolder);
cardNumber = new CreditCardField("cardNumber");
paymentFieldSet.add(cardNumber);
cardExpiry = new IntegerField("expiry");
cardExpiry.setSize(4);