Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Model View Controller Framework" Watch "Model View Controller Framework" New topic

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:
subject: Model View Controller Framework
It's not a secret anymore!