I am having trouble implementing MasterMind (the game). I designed a
class that adds to a JPanel multiple JComponents which each contain 4
circles. Upon clicking a circle, the program prints an appropriate colored
circle that the user has selected over the circle. The problem is that when
implementing it, I am only allowed to let the user to click on one row at a
time, starting with the first row. I've tried many things...should I
perhaps implement the MouseListener in a separate class rather than inside
the ...Is there an easy way to allow the user to click on one row at a time?
Eric Sosman - 31 Aug 2005 18:41 GMT
> I am having trouble implementing MasterMind (the game). I designed a
> class that adds to a JPanel multiple JComponents which each contain 4
[quoted text clipped - 4 lines]
> perhaps implement the MouseListener in a separate class rather than inside
> the ...Is there an easy way to allow the user to click on one row at a time?
How about theComponent.setEnable(boolean)?
If that doesn't help, you'll probably need to show
actual code for what you're doing.

Signature
Eric.Sosman@sun.com