private void moveIfGreater(Point result, Point test) { if (test.x > result.x) { result.x = test.x;
private void moveIfGreater(Dimension result, Dimension test) { if (test.width > result.width) { result.width = test.width;
    private void moveIfGreater(Point result, Point test) {        if (test.x > result.x) {            result.x = test.x;        }        if (test.y > result.y) {            result.y = test.y;        }    }