Component[] comps = getComponents (); int sz = range[1] - range[0]; Component[] nc = new Component[sz]; for (int i = 0; i < sz; ++i) nc[i] = comps[range[0] + i]; return nc;
inLayer[j] = components[i]; j++; }
  public Component[] getComponentsInLayer(int layer)  {    int[] range = layerToRange (getObjectForLayer (layer));    if (range[0] == range[1])	    return new Component[0];    else	    {        Component[] comps = getComponents ();        int sz = range[1] - range[0];        Component[] nc = new Component[sz];        for (int i = 0; i < sz; ++i)          nc[i] = comps[range[0] + i];        return nc;	    }  }