bounds.contains() problem

I try to use method above with a simple point class in this form:

bounds.contains(newPoint)

, but it says: cannot resolve method.