This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Model View Controller Framework

 
John Vorwald
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind, I just had to implement the addPropertyChangeListener method in the View so that the Controller was accessible from inside the View.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic