private void computeHeaderSizes(){
  itemHeight=fontMetrics.getHeight() + 3;
  int colHeaderHeight=0;
  for (  GridColumn column : topColumns) {
    colHeaderHeight=Math.max(column.getHeaderHeight(true),colHeaderHeight);
  }
  headerHeight=colHeaderHeight;
  rowHeaderWidth=DEFAULT_ROW_HEADER_WIDTH;
  for (int i=0; i < rowElements.length; i++) {
    Object row=rowElements[i];
    GridNode parentNode=parentNodes[i];
    GridNode nr=rowNodes.get(row);
    int width=rowHeaderRenderer.computeHeaderWidth(row,nr != null ? nr.level : parentNode == null ? 0 : parentNode.level + 1);
    rowHeaderWidth=Math.max(rowHeaderWidth,width);
  }
  if (rowHeaderWidth > MAX_ROW_HEADER_WIDTH) {
    rowHeaderWidth=MAX_ROW_HEADER_WIDTH;
  }
}

private void computeHeaderSizes ( ) { itemHeight = fontMetrics . getHeight ( ) + 3 ; int colHeaderHeight = 0 ; for ( GridColumn column : topColumns ) { colHeaderHeight = Math . max ( column . getHeaderHeight ( true ) , colHeaderHeight ) ; } headerHeight = colHeaderHeight ; rowHeaderWidth = DEFAULT_ROW_HEADER_WIDTH ; for ( int i = 0 ; i < rowElements . length ; i ++ ) { Object row = rowElements [ i ] ; GridNode parentNode = parentNodes [ i ] ; GridNode nr = rowNodes . get ( row ) ; int width = rowHeaderRenderer . computeHeaderWidth ( row , nr != null ? nr . level : parentNode == null ? 0 : parentNode . level + 1 ) ; rowHeaderWidth = Math . max ( rowHeaderWidth , width ) ; } if ( rowHeaderWidth > MAX_ROW_HEADER_WIDTH ) { rowHeaderWidth = MAX_ROW_HEADER_WIDTH ; } }
computes and sets the height of the header row . this method will ask for the preferred size of all the column headers and use the max .
