This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Well, what you are using is not standard Java library class so I can't provide help with that code.
Anyway, use paper to do calculations you need. Draw one rectangle and another one (smaller) inside it, placed at the center of the first one. It will be easy to deduce the position of the smaller one in terms of the big one. Use that conclusion to place rectangle in your code at proper position.