public JPanel getPanelFor(Form f) throws InvalidTemplateException {
   // clear();by jai
   // uiList = new ArrayList();
   // uiElementsList = new ArrayList();
   ArrayList list = getXmlUIElements(f);
   Vector tables = f.getTables();
   if (tables.size() == 0) {
     return getPanelFor(list);
   } else {
     Table table = (Table) tables.elementAt(0);
     return getPanelWithTable(list, table);
   }
 }
 public ArrayList getXmlUIElements(Form f) throws InvalidTemplateException {
   Vector v = f.getUserInputs();
   Vector userInputVecArg = new Vector();
   int size = v.size();
   for (int i = 0; i < size; i++) {
     UserInput ui = (UserInput) v.elementAt(i);
     String satisfied = ui.getAttribute("satisfied");
     if (satisfied == null || (!satisfied.equals("false"))) {
       userInputVecArg.addElement(ui);
     }
   }
   ArrayList list = new ArrayList(userInputVecArg.size());
   for (int i = 0, j = userInputVecArg.size(); i < j; i++) {
     UserInput ui = (UserInput) userInputVecArg.elementAt(i);
     uiList.add(ui);
     XmlUIElement el = getXmlElement(ui);
     uiElementsList.add(el);
     list.add(el);
   }
   return list;
 }