public void layoutContainer(Container parent){
  Insets insets=parent.getInsets();
  int width=insets.left;
  int height=insets.top;
  if (needLayout(parent)) {
    int x=5;
    int y=5;
    for (int i=0; i < parent.getComponentCount(); i++) {
      Component comp=parent.getComponent(i);
      if (comp.isVisible() && comp instanceof WFNode) {
        Dimension ps=comp.getPreferredSize();
        comp.setLocation(x,y);
        comp.setBounds(x,y,ps.width,ps.height);
        width=x + ps.width;
        height=y + ps.height;
        if (x == 5)         x=230;
 else {
          x=5;
          y+=100;
        }
      }
    }
  }
 else {
    for (int i=0; i < parent.getComponentCount(); i++) {
      Component comp=parent.getComponent(i);
      if (comp.isVisible() && comp instanceof WFNode) {
        Dimension ps=comp.getPreferredSize();
        Point loc=comp.getLocation();
        int maxWidth=comp.getX() + ps.width;
        int maxHeight=comp.getY() + ps.height;
        if (width < maxWidth)         width=maxWidth;
        if (height < maxHeight)         height=maxHeight;
        comp.setBounds(loc.x,loc.y,ps.width,ps.height);
      }
    }
  }
  WFContentPanel panel=(WFContentPanel)parent;
  panel.createLines();
  width+=insets.right;
  height+=insets.bottom;
  m_size=new Dimension(width,height);
  log.finer("Size=" + m_size);
}

public void layoutContainer ( Container parent ) { Insets insets = parent . getInsets ( ) ; int width = insets . left ; int height = insets . top ; if ( needLayout ( parent ) ) { int x = 5 ; int y = 5 ; for ( int i = 0 ; i < parent . getComponentCount ( ) ; i ++ ) { Component comp = parent . getComponent ( i ) ; if ( comp . isVisible ( ) && comp instanceof WFNode ) { Dimension ps = comp . getPreferredSize ( ) ; comp . setLocation ( x , y ) ; comp . setBounds ( x , y , ps . width , ps . height ) ; width = x + ps . width ; height = y + ps . height ; if ( x == 5 ) x = 230 ; else { x = 5 ; y += 100 ; } } } } else { for ( int i = 0 ; i < parent . getComponentCount ( ) ; i ++ ) { Component comp = parent . getComponent ( i ) ; if ( comp . isVisible ( ) && comp instanceof WFNode ) { Dimension ps = comp . getPreferredSize ( ) ; Point loc = comp . getLocation ( ) ; int maxWidth = comp . getX ( ) + ps . width ; int maxHeight = comp . getY ( ) + ps . height ; if ( width < maxWidth ) width = maxWidth ; if ( height < maxHeight ) height = maxHeight ; comp . setBounds ( loc . x , loc . y , ps . width , ps . height ) ; } } } WFContentPanel panel = ( WFContentPanel ) parent ; panel . createLines ( ) ; width += insets . right ; height += insets . bottom ; m_size = new Dimension ( width , height ) ; log . finer ( "Size=" + m_size ) ; }
lays out the specified container .
