TextBoxItem jndiItem = new TextBoxItem("jndiName", "JNDI");
CheckBoxItem enabledFlagItem = new CheckBoxItem("enabled", "Is enabled?");
TextItem driverItem = new TextItem("driverName", "Driver");
TextBoxItem userItem = new TextBoxItem("username", "Username");
PasswordBoxItem passwordItem = new PasswordBoxItem("password", "Password");
form.setFields(nameItem, jndiItem, enabledFlagItem, driverItem);
form.setFieldsInGroup("Connection", new DefaultGroupRenderer(), userItem, passwordItem);
form.setEnabled(false); // currently not editable