Break down the cylinder into its component parts. You already know about drawOval so that's half of the job. I expect you also know about the method required to draw a straight line. Besides that there's just some arithmetic required to figure out where to draw each of the parts.
Joined: Apr 09, 2002
So no shortcut? :-) I didn't want to go ahead and re-invent the wheel if something already existed. Thanks for the feedback.
I haven't checked. You could look at the Graphics documentation for yourself to see if there's drawCylinder or whatever. I just know from experience that people who write APIs don't typically write a ton of convenience methods like that, especially when they just involve simple extensions which anybody could do in a few minutes. You might find that somebody else has written a fancy graphics package which has that ton of convenience methods, though.