wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes MVC pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "MVC pattern" Watch "MVC pattern" New topic
Author

MVC pattern

leo donahue
Ranch Hand

Joined: Apr 17, 2003
Posts: 327
I've seen a few variations of the MVC pattern when it comes to swing applications. However, my question is a little bit more general than just swing and it relates to what exactly belongs in the model.

I've adapted a sample I found online regarding the MVC pattern.

Should only the controller have access to update the View?

Is the code in Model.java considered "model" code, or does what I have in Model.java actually belong in Controller.java?

MVCDemo.java


Model.java


View.java


Controller.java


Thanks, leo
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MVC pattern
 
Similar Threads
making a class visible
JCheckBox?
JTable(my model is changed how do i update my view)?
This is MVC.
mouseClicked event for the "Cancel button"