Area shape = new Area(shape1); shape.add(new Area(shape2)); shape.subtract(new Area(shape3)); shape.intersect(new Area(shape4)); shape.exclusiveOr(new Area(shape5));