Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes Drawing a Rectangle, Oval, and Square Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Drawing a Rectangle, Oval, and Square" Watch "Drawing a Rectangle, Oval, and Square" New topic

Drawing a Rectangle, Oval, and Square

Michael Taylor

Joined: Jun 19, 2002
Posts: 15
I am trying to write a program where the user clicks on a button labeled "Rectangle", "Oval", or "Square" and when that action is performed the appropriate shape is display. Can someone look at the partial code below and give me some pointers?

Any help would be appreciated.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
How have you considered organizing your project? What objects might the project need and what heirarchy might they create? Are you trying to work polymorphism into your project?
If you'd like to learn a bit about what polymorphism is, take a look at The "How My Dog Learned Polymorphism" Story in The Campfire Stories.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: Drawing a Rectangle, Oval, and Square
It's not a secret anymore!