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