This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Help with drawing random shapes based on JComboBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help with drawing random shapes based on JComboBox" Watch "Help with drawing random shapes based on JComboBox" New topic
Author

Help with drawing random shapes based on JComboBox

Mike Williams
Greenhorn

Joined: Jan 30, 2004
Posts: 7
I am trying to create a JFrame that has a JComboBox at the bottom with the following items in it: "Circle", "Oval", "Rectangle", and "Square"
Then once the user selects a shape from the box, it will draw 20 random types of that shape.
This is the code I have so far, it's more like a skeleton, cause im kind of lost.

I hope i made everything clear, can anyone help me?
[ January 30, 2004: Message edited by: Mike Joe ]
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Mike Williams
Greenhorn

Joined: Jan 30, 2004
Posts: 7
Thanks to the person who helped me, i figured out my other minor problem.
[ January 31, 2004: Message edited by: Mike Williams ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help with drawing random shapes based on JComboBox
 
Similar Threads
Having touble adding graphics to JPanel
Trying to finish program
New here; please help(",): Play Shape; A program that reads a shape number!?!?!?!?
Need to finish my program, but lost
MousePressed