+\r
+ Component[] comps;\r
+ int cSize = featurePanel.getComponentCount();\r
+ Checkbox check;\r
+ //This will remove any checkboxes which shouldn't be\r
+ //visible\r
+ for (int i = 0; i < cSize; i++)\r
+ {\r
+ comps = featurePanel.getComponents();\r
+ check = (Checkbox) comps[i];\r
+ if (!visibleChecks.contains(check.getLabel()))\r
+ {\r
+ featurePanel.remove(i);\r
+ cSize --;\r
+ i--;\r
+ }\r
+ }\r
+\r
+ if(fr.renderOrder!=null)\r
+ {\r
+ //First add the checks in the previous render order,\r
+ //in case the window has been closed and reopened\r
+ for(int ro=fr.renderOrder.length-1; ro>-1; ro--)\r
+ {\r
+ String item = fr.renderOrder[ro];\r
+\r
+ if(!visibleChecks.contains(item))\r
+ continue;\r
+\r
+ visibleChecks.removeElement(item);\r
+\r
+ addCheck(false, item);\r
+ }\r
+ }\r
+\r
+ // now add checkboxes which should be visible,\r
+ // if they have not already been added\r
+ Enumeration en = visibleChecks.elements();\r
+\r
+ while(en.hasMoreElements())\r
+ {\r
+ addCheck(groupsChanged, en.nextElement().toString());\r
+ }\r
+\r
+\r
+ featurePanel.setLayout(new GridLayout(featurePanel.getComponentCount(), 1, 10,5));\r