code: private void removeExistingTable(VerticalLayout layout) {
  
          List<Component> tobeRemoved = new ArrayList<Component>();
          Iterator<Component> it = layout.iterator();
          while (it.hasNext()) {
              Component comp = it.next();
              if ((comp instanceof FixedHeightPanel) | (comp instanceof TextField) | (comp instanceof VerticalLayout)) {
                  tobeRemoved.add(comp);
              }
          }
          for (Component c : tobeRemoved) {
              layout.removeComponent(c);
          }
      }
docs: Check if table exists in given layout. Removes all tables.<p>
  
  @param layout to be cleaned from tables