code: public void setWidths(float relativeWidths[]) throws DocumentException {
          if (relativeWidths.length != getNumberOfColumns())
              throw new DocumentException("Wrong number of columns.");
          this.relativeWidths = new float[relativeWidths.length];
          System.arraycopy(relativeWidths, 0, this.relativeWidths, 0, relativeWidths.length);
          absoluteWidths = new float[relativeWidths.length];
          totalHeight = 0;
          calculateWidths();
          calculateHeights(true);
      }
docs: Sets the relative widths of the table.
  
  @param relativeWidths the relative widths of the table.
  @throws DocumentException if the number of widths is different than the number
  of columns