| | |
problem with implementing MVC
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Oct 2007
Posts: 280
Reputation:
Solved Threads: 19
I have recently encoutered an error that I have failed to figure out while trying to implement something in MVC. I have used a similar code on another program which seems to work but I cant figure out why this one is not working.
I get the error code "cannot find symbol class myGameModel". this error is repeated for the controller, panel and view.
I will post the controller and model only. Hope to get some advice. thanks.
PS. the above code is just a structure but when I compile the individual files, It cant seem to find other classes
I get the error code "cannot find symbol class myGameModel". this error is repeated for the controller, panel and view.
I will post the controller and model only. Hope to get some advice. thanks.
java Syntax (Toggle Plain Text)
//CONTROLLER package Game; public class myGameController{ private myGameModel model; private myGameView view; public myGameController(myGameModel model){ this.model=model; } public void set(myGameView view){ this.view=view; } public void newGame(myGameModel model){ model.newGame(); } } //MODEL package Game; import java.util.Observable; import java.*; public class myGameModel extends Observable { private myGameController controller; private boolean turn; private int[][] gameBoard=new int[3][3];; public void newGame() { //some code } }
![]() |
Similar Threads
Other Threads in the Java Forum
- Previous Thread: code required
- Next Thread: trouble with method call
| Thread Tools | Search this Thread |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer j2me java javaprojects jme jmf jni jpanel jtextarea julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sortedmaps sql storm string support swing test threads time tree unlimited webservices windows





