Java examples for 2D Graphics:Rectangle
get Rectangle2D upper left corner
//package com.java2s; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; public class Main { public static Point2D UL(Rectangle2D rect) { return new Point2D.Double(rect.getX(), rect.getY() + rect.getHeight());//from ww w . j av a 2s. com } }