Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / August 2005

Tip: Looking for answers? Try searching our database.

Help w/ MouseListener (MasterMind)

Thread view: 
Unknown - 31 Aug 2005 11:20 GMT
 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



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.