A classe java.awt.Point tem dois campos, x e
y, do tipo int. Essa classe oferece um construtor
que permite criar um ponto representando as coordenadas do ponto,
passadas como argumentos para o construtor:
public Point(int x, int y)
Constructs and initializes a point at the specified
(x, y) location in the coordinate space.
Parameters:
x - the x coordinate.
y - the y coordinate.
Há também outro construtor que recebe como argumento um outro objeto da classe
Point:
public Point(Point p)
Constructs and initializes a point with the same location as
the specified Point object.
Parameters:
p - a point.
Since:
JDK1.1
Há também um construtor default,
public Point()
Constructs and initializes a point at the origin
(0, 0) of the coordinate space.