Mega Code Archive

 
Categories / Java Tutorial / 2D Graphics
 

Java awt Point

A Point object represents a point in a coordinate system. It has two int fields, x and y. You can construct a Point object by using one of its constructors. public Point () public Point (int x, int y) public Point (Point anotherPoint) The Point class's getX and getY methods return the value of the x and y fields in double, respectively.