layoutContainer(Container target) {
public void layoutContainer(Container target) {
layoutContainer(Container target){  synchronized (target.getTreeLock ())    {      Insets i = 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 c = calcCompSize(center, PREF);      Dimension n = calcCompSize(my_north, PREF);      Dimension s = calcCompSize(my_south, PREF);      Dimension e = calcCompSize(my_east, PREF);      Dimension w = calcCompSize(my_west, PREF);      Dimension t = target.getSize();      /*	<-> hgap     <-> hgap	+----------------------------+          }	|t                           |          } i.top	|  +----------------------+  |  --- y1  }	|  |n                     |  |	|  +----------------------+  |          } vgap	|  +---+ +----------+ +---+  |  --- y2  }        }	|  |w  | |c         | |e  |  |                   } hh	|  +---+ +----------+ +---+  |          } vgap   }	|  +----------------------+  |  --- y3  }	|  |s                     |  |	|  +----------------------+  |          }	|                            |          } i.bottom	+----------------------------+          }	|x1   |x2          |x3	<---------------------->	<-->         ww           <-->	i.left                    i.right      */      int x1 = i.left;      int x2 = x1 + w.width + (w.width == 0 ? 0 : hgap);      int x3;      if (t.width <= i.right + e.width)        x3 = x2 + w.width + (w.width == 0 ? 0 : hgap);      else        x3 = t.width - i.right - e.width;      int ww = t.width - i.right - i.left;      int y1 = i.top;      int y2 = y1 + n.height + (n.height == 0 ? 0 : vgap);      int midh = Math.max(e.height, Math.max(w.height, c.height));      int y3;      if (t.height <= i.bottom + s.height)        y3 = y2 + midh + vgap;      else        y3 = t.height - i.bottom - s.height;      int hh = y3-y2-(s.height == 0 ? 0 : vgap);      setBounds(center, x2, y2, x3-x2-(w.width == 0 ? 0 : hgap), hh);      setBounds(my_north, x1, y1, ww, n.height);      setBounds(my_south, x1, y3, ww, s.height);      setBounds(my_west, x1, y2, w.width, hh);      setBounds(my_east, x3, y2, e.width, hh);    }}