Java Shape.getBounds2D()
Syntax
Shape.getBounds2D() has the following syntax.
Rectangle2D getBounds2D()
Example
In the following code shows how to use Shape.getBounds2D() method.
import java.awt.Shape;
import java.awt.geom.Rectangle2D;
//from w ww. j av a2s . co m
public class Main {
public static void main(String[] args) throws Exception {
Shape s = new Rectangle2D.Double(0, 0, 72, 72);
System.out.println(s.getBounds2D());
}
}
Home »
Java Tutorial »
java.awt »
Java Tutorial »
java.awt »