I have a Polygon :
Polygon
I want to check if the location of the object is inside this Polygon .As an example of x: 5 and y: 5, How can I check if this Coordinator is inside this polygon (Java)?
If you create polgyon using the Polygon class, which is included in java, use the contains() method.
contains()
http://docs.oracle.com/javase/6/docs/api/java/awt/Polygon.html
Take a look at the description of the method.
contains(int x, int y) - determines whether the specified coordinates are inside this polygon.
contains(int x, int y)