get Rectangle Bottom Center - Java 2D Graphics

Java examples for 2D Graphics:Rectangle

Description

get Rectangle Bottom Center

Demo Code


//package com.java2s;
import java.awt.Point;
import java.awt.Rectangle;

public class Main {
    public static Point getBottomCenter(Rectangle bounds) {
        Point pt = bounds.getLocation();
        pt.translate(bounds.width / 2, bounds.height);
        return pt;
    }/*from   w ww.j  a  va 2  s. co  m*/
}

Related Tutorials