This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Enter # in JTextField, draw = # ovals, use JBottons to color ovals??? 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 "Enter # in JTextField, draw = # ovals, use JBottons to color ovals???" Watch "Enter # in JTextField, draw = # ovals, use JBottons to color ovals???" New topic
Author

Enter # in JTextField, draw = # ovals, use JBottons to color ovals???

Douglas Braxton
Ranch Hand

Joined: Jan 28, 2004
Posts: 36
all
i have an assignment that requires the user to enter a JTextField integer value.
that value is then used to draw an equal # of ovals.
after the ovals are drawn user selects a color button (red/blue) to fill the ovals already drawn based on the button color.
i have everything coded and working except the coloring.
i need help because i can't seem to figure out where or how to fill the ovals with the colors of the button pushed.
OvalDriver7b invokes OvalFrame7B invokes OvalPanel7B.
thanx
75gator



[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 27, 2004: Message edited by: Douglas Braxton ]
[ April 28, 2004: Message edited by: Douglas Braxton ]
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
try this
Douglas Braxton
Ranch Hand

Joined: Jan 28, 2004
Posts: 36
thanks michael!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Enter # in JTextField, draw = # ovals, use JBottons to color ovals???
 
Similar Threads
creating random mole and removing it.
I am trying to create dynamic text
BufferedImage ?
Java Messages
using a bean to put slider on panel