my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes Controller class?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Controller class??" Watch "Controller class??" New topic
Author

Controller class??

Stefan Elfvinge
Ranch Hand

Joined: Oct 29, 2001
Posts: 52
Hello, all!
I'm trying to develop a swing-app, a dicegame(yatzy).
Classes: Player, PlayField, Die, ScoreBoard, ThrowResult, HighScore, various JButtons, ResultComputer, PlayTable(JFrame), and GameController. I need a tip or two on how to take the best object-oriented approach. The tricky part is not the inheritance part or aggregation. The keyword seems, to me anyway, to be GameController. I mean, without it, you end up doing nothing but sending references here and there, back and forth. Anyway, the main question: Is it a good idea to let the GameController hold references to each object of interest to be able to setup and display the right ScoreBoard to the right player, send a ThrowResult to the ResultComputer, etc, etc. Hope I made myself understood??!!
Would appreciate some hints and tips!!


Steffe
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Controller class??
 
Similar Threads
Thread safe Please help!!!
First Java Game - Help REALLY appreciated
variable that holds a object
Command Pattern - what is it applicable for ?
CardLayout- how to deal with it?