This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Model View Controller Framework 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 » Java in General
Bookmark "Model View Controller Framework" Watch "Model View Controller Framework" New topic
Author

Model View Controller Framework

John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
I had several number crunching classes that I"m trying to hook together in a multi-thread application. I'm implementing the model/view/controller framework, but have a question about a how to handle user input. Currently, the app window displays information from the different Views in tabbed panels. This is fine for showing output through the view classes. But, how to handle input to the model classes.

The view interface is



The Model interface is




It seems that the only way the View can communicate back to the Model is by passing a Model as an argument during construction.
Any other suggestions/recommendations?
John Vorwald
Ranch Hand

Joined: Sep 26, 2010
Posts: 139
Never mind, I just had to implement the addPropertyChangeListener method in the View so that the Controller was accessible from inside the View.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Model View Controller Framework
 
Similar Threads
MVC for click and drag interface with multiple models
Adding an action listener to an entire class
Java Bean - addPropertyChangeListener
Action Interface
notification when a public attribute value changes