// <option value="H" selected="true"/>
// </optgoup>
// group 1
SelectOptionGroup group1 = createOptionGroup("1");
// option A
group1.addSelectOption(createOption("A"));
// Option B
SelectOption B = createOption("B");
//option C
SelectOption C = createOption("C");
// group 2
SelectOptionGroup group2 = createOptionGroup("2");
group2.addSelectOption(B);
group2.addSelectOption(C);
group1.addSelectOptionGroup(group2);
// option D
SelectOption D = createOption("D");
D.setSelected(true);
// option E
SelectOption E = createOption("E");
E.setSelected(true);
// group 3
SelectOptionGroup group3 = createOptionGroup("3");
group3.addSelectOption(D);
group3.addSelectOption(E);
group1.addSelectOptionGroup(group3);
// option F
SelectOption F = createOption("F");
// option G
SelectOption G = createOption("G");
// group 4
SelectOptionGroup group4 = createOptionGroup("4");
group4.addSelectOption(F);
group4.addSelectOption(G);
group1.addSelectOptionGroup(group4);
// option H
SelectOption H = createOption("H");
H.setSelected(true);