Java examples for 2D Graphics:Rectangle
get Rectangle Left Center
//package com.java2s; import java.awt.Point; import java.awt.Rectangle; public class Main { public static Point getLeftCenter(Rectangle bounds) { Point pt = bounds.getLocation(); pt.translate(0, bounds.height / 2); return pt; }/* ww w . ja v a 2s. c o m*/ }