return getDepth(c1) - getDepth(c2);
Rectangle d2 = (Rectangle) dirtyComponents.get(c2); return d2.width * d2.height - d1.width * d1.height;
    public int compare(Object o1, Object o2)    {      if (o1 instanceof JComponent && o2 instanceof JComponent)        {          JComponent c1 = (JComponent) o1;          JComponent c2 = (JComponent) o2;          return getDepth(c1) - getDepth(c2);        }      else        throw new ClassCastException("This comparator can only be used with "                                     + "JComponents");    }