Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 关于MVC的一点小问题
sheshou





发贴: 2
积分: 0
于 2005-12-16 11:07 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
本人编制一个计算器。但老师必须要用MVC的模式改写,我现在只知道在VIEW里面把界面完成了,不知道那些具体的+,-,*,/操作应该放在MODEL里面,还是在controller里面。

而且,在VIEW里面创建的那些BOTTON,TEXTFIELD等等,以前我用Press=e.getSource判断用户的操作,现在VIEW都CONTROLLER分开,那些界面控件又不能直接引用,怎么判断用户的操作,怎么响应它~~~?



作者 Re:关于MVC的一点小问题 [Re:sheshou]
emarket

亢龙有诲

CJSDN高级会员


发贴: 460
积分: 82
于 2005-12-16 22:22 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
理论上来讲应该是在model里面, 但是有一点,Swing的MVC可是和一般的MVC有点不同的哦。

“VIEW都CONTROLLER分开" 是怎么讲?
"界面控件又不能直接引用", controller是不是要负责一下呢?



个人Blog http://agilespeaking.blogspot.com/

作者 Re:关于MVC的一点小问题 [Re:sheshou]
sheshou





发贴: 2
积分: 0
于 2005-12-17 21:32 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
很感谢,等我再考虑一下



flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923