code: private static Ellipse2D.Double toOval(final Rectangle2D pRectangle) {
          Ellipse2D.Double ellipse = new Ellipse2D.Double();
          ellipse.setFrame(pRectangle);
          return ellipse;
      }
docs: Drawing Ovals: