code: public static List<Object> getChildren(TreeModel treeModel, Object node)
      {
          List<Object> children = new ArrayList<Object>();
          int n = treeModel.getChildCount(node);
          for (int i=0; i<n; i++)
          {
              Object child = treeModel.getChild(node, i);
              children.add(child);
          }
          return children;
      }
docs: Returns the children of the given node in the given tree model
  
  @param treeModel The tree model
  @param node The node
  @return The children