Java Point.setLocation(int x, int y)
Syntax
Point.setLocation(int x, int y) has the following syntax.
public void setLocation(int x, int y)
Example
In the following code shows how to use Point.setLocation(int x, int y) method.
// w ww . j av 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(2,3);
System.out.println(p.toString());
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »