height += (ndim.height + sdim.height + (vgap * 2) + ins.top + ins.bottom);
int addedHeight = height + (ndim.height + sdim.height + (vgap * 2) + ins.top + ins.bottom);  if (addedHeight < height) height = Integer.MAX_VALUE; else height = addedHeight;
calcSize(Container target, int what){  synchronized (target.getTreeLock ())    {      Insets ins = target.getInsets();      ComponentOrientation orient = target.getComponentOrientation ();      boolean left_to_right = orient.isLeftToRight ();      Component my_north = north;      Component my_east = east;      Component my_south = south;      Component my_west = west;      // Note that we currently don't handle vertical layouts.  Neither      // does JDK 1.3.      if (firstLine != null)	my_north = firstLine;      if (lastLine != null)	my_south = lastLine;      if (firstItem != null)	{	  if (left_to_right)	    my_west = firstItem;	  else	    my_east = firstItem;	}      if (lastItem != null)	{	  if (left_to_right)	    my_east = lastItem;	  else	    my_west = lastItem;	}            Dimension ndim = calcCompSize(my_north, what);      Dimension sdim = calcCompSize(my_south, what);      Dimension edim = calcCompSize(my_east, what);      Dimension wdim = calcCompSize(my_west, what);      Dimension cdim = calcCompSize(center, what);      int width = edim.width + cdim.width + wdim.width + (hgap * 2);      if (ndim.width > width)	width = ndim.width;      if (sdim.width > width)	width = sdim.width;      width += (ins.left + ins.right);      int height = edim.height;      if (cdim.height > height)	height = cdim.height;      if (wdim.height > height)	height = wdim.height;      height += (ndim.height + sdim.height + (vgap * 2) + ins.top + ins.bottom);      return(new Dimension(width, height));    }}