overloading setLocation method to accept Rectangle