Molly
There are two methods you can try.
1) The Graphics2D class extends Graphics, so you should be able to call
drawRoundRect() without any problems.
2) Alternatly, the Graphics2D class has a method draw() that takes a Shape
as a parameter. In the java.awt.geom package there is a class
RoundRectangle2D that indirectly implements the Shape interface (acctually
extends RectangularShape which implements Shape). Instantiate either
RoundRectangle2D.Double or RoundRectangle2D.Float and pass this as the
parameter to draw().
Hope this helps.
David Clearman
[EMAIL PROTECTED]
>From: Molly Quinn <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Question about Graphic2Ds
>Date: Tue, 28 Mar 2000 08:21:20 -0500
>
>Hi, Gurus of the List:
>
>I am trying to write a servlet which can dynamically generate JPEG file. I
>has a need for a 2D rounded rectangle. Unfortunately I couldn't found a
>proper method in the Graphics2D class. the drawRoundRect() method is
>presented in the Graphics class not the Graphics2D.
>
>I'd really appreciate help on this matter.
>
>Hope you guys can see my message. Since I have replied to some questions on
>this List before. I had hard time seeing my answers send back to me. I
>thought this is because that the list is not echoing messages back to the
>person who sends it(and I hope this is the case). I will only keep my
>finger
>crossed that you guys can see this.
>
>Thanks a lot.
>
>Molly
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html