get Rectangle Left Center - Java 2D Graphics

Java examples for 2D Graphics:Rectangle

Description

get Rectangle Left Center

Demo Code


//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*/
}

Related Tutorials