code: private static int[] computeGridOrigins(Container container,
              int totalSize, int offset,
              List formSpecs,
              List[] componentLists,
              int[][] groupIndices,
              Measure minMeasure,
              Measure prefMeasure) {
          /* For each spec compute the minimum and preferred size that is
           * the maximum of all component minimum and preferred sizes resp.
           */
          int[] minSizes = maximumSizes(container, formSpecs, componentLists,
                  minMeasure, prefMeasure, minMeasure);
          int[] prefSizes = maximumSizes(container, formSpecs, componentLists,
                  minMeasure, prefMeasure, prefMeasure);
  
          int[] groupedMinSizes = groupedSizes(groupIndices, minSizes);
          int[] groupedPrefSizes = groupedSizes(groupIndices, prefSizes);
          int totalMinSize = sum(groupedMinSizes);
          int totalPrefSize = sum(groupedPrefSizes);
          int[] compressedSizes = compressedSizes(formSpecs,
                  totalSize,
                  totalMinSize,
                  totalPrefSize,
                  groupedMinSizes,
                  prefSizes);
          int[] groupedSizes = groupedSizes(groupIndices, compressedSizes);
          int totalGroupedSize = sum(groupedSizes);
          int[] sizes = distributedSizes(formSpecs,
                  totalSize,
                  totalGroupedSize,
                  groupedSizes);
          return computeOrigins(sizes, offset);
      }
docs: Computes and returns the grid's origins.
  
  @param container the layout container
  @param totalSize the total size to assign
  @param offset the offset from left or top margin
  @param formSpecs the column or row specs, resp.
  @param componentLists	the components list for each col/row
  @param minMeasure	the measure used to determine min sizes
  @param prefMeasure	the measure used to determine pre sizes
  @param groupIndices	the group specification
  @return an int array with the origins