aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Draw a Shape by selecting(combox) its color and clicking a button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Draw a Shape by selecting(combox) its color and clicking a button" Watch "Draw a Shape by selecting(combox) its color and clicking a button" New topic
Author

Draw a Shape by selecting(combox) its color and clicking a button

Alam Ikenna
Greenhorn

Joined: Mar 26, 2008
Posts: 16
Good day all,

Kindly show me how i can choose a color from a combo box, click on any labeled button(say rectangle or circle) and it draws that shape(say rectangle). Also when I click on the other button(Circle), it removes the Rectangle that was drawn and replaces it with a Circle.

Thanks
Alam Ikenna
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2097
    
    7
Cross posted: http://forums.sun.com/thread.jspa?threadID=5427332&tstart=0

Be Forthright When Cross Posting To Other Sites
Alam Ikenna
Greenhorn

Joined: Mar 26, 2008
Posts: 16


Thanks for the correction. I never thought of it that way. As a matter of facts, I join forums for the purpose of learning. This has shown me a great lesson, but i plead that this incident will not stop you or any other person from helping me out. I really need your supports to learn more.

Thanks
Alam Ikenna.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Kindly show me how i can choose a color from a combo box,
> click on any labeled button(say rectangle or circle) and it draws that shape(say rectangle).
> Also when I click on the other button(Circle), it removes the Rectangle that was drawn and replaces it with a Circle.

so, what's the problem?

you can't make a selection from a comboBox?
you can't click a button?
you can't draw a shape?
 
 
subject: Draw a Shape by selecting(combox) its color and clicking a button
 
Similar Threads
Generics: Shape example does not work as SUN says
Applet that lets you draw shapes, custom component and action
Frame shape
Passing parameter from Web UI to RCP
How optimize paintComponent?