Java Point.setLocation(double x, double y)
Syntax
Point.setLocation(double x, double y) has the following syntax.
public void setLocation(double x, double y)
Example
In the following code shows how to use Point.setLocation(double x, double y) method.
//from w w w . j a v a 2 s . c om
import java.awt.Point;
public class Main {
public static void main(String[] args) {
Point p = new Point();
p.setLocation(2.3D,3.3D);
System.out.println(p.toString());
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »