*
The moose likes Swing / AWT / SWT and the fly likes Connections between classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Connections between classes" Watch "Connections between classes" New topic
Author

Connections between classes

Pan Niko
Ranch Hand

Joined: Mar 19, 2011
Posts: 86

Hello,

Im trying to build a board game called "River crossing" in Java. My idea:

Have one board class where there create the main board of the game.
Contains pocket elements






Separate classes per game's levels.



There is a way to modify the board from board class depends of in what level you are?

*Any better ideas for structure, are welcomed
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

By convention, Java class names begin with an uppercase letter.

Unless you are overriding default behavior (not likely), extending JFrame and JButton is a misuse of inheritance. And event listeners are usually more conveniently programmed as anonymous inner classes instead of being implemented in a class.

luck, db
There are no new questions, but there may be new answers.
 
jQuery in Action, 2nd edition
 
subject: Connections between classes
 
Similar Threads
Compiling multiple source files.
drawing on the screen in response to user-initiated actions
Someone, everyone, PLEASE HELP ME ON A PROJECT!!
More succinct way to write this code?
Problem clearing and resetting a JPanel