for (int i = 0; i < components.length; i += 2) { if (components[i] == null) continue; setComponentToSize(components[i], sizes[i], width, insets, dims); width += sizes[i]; } if (components[1] != null) { setComponentToSize(components[1], sizes[1], width, insets, dims); width += sizes[1]; }
int loc = getInitialLocation(insets); int available = getAvailableSize(dims, insets); sizes[0] = getDividerLocation(split) - loc; sizes[1] = available - sizes[0] - sizes[1];    setComponentToSize(components[0], sizes[0], loc, insets, dims);  loc += sizes[0]; setComponentToSize(components[2], sizes[2], loc, insets, dims);  loc += sizes[2]; setComponentToSize(components[1], sizes[1], loc, insets, dims);
    public void layoutContainer(Container container)    {      if (container instanceof JSplitPane)        {	  JSplitPane split = (JSplitPane) container;	  distributeExtraSpace();	  Insets insets = split.getInsets();	  int width = getInitialLocation(insets);	  Dimension dims = split.getSize();	  for (int i = 0; i < components.length; i += 2)	    {	      if (components[i] == null)		continue;	      setComponentToSize(components[i], sizes[i], width, insets, dims);	      width += sizes[i];	    }	  if (components[1] != null)	    {	      setComponentToSize(components[1], sizes[1], width, insets, dims);	      width += sizes[1];	    }        }    }