- 1、本文档共11页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
SWT和Swing的区别(国外英文资料)
SWT和Swing的区别(国外英文资料)
Ive learned Swing in the past (and also a enhanced version of the AWT), and now Im starting to learn about SWT, and I havent yet begun to dive into JFace and RCP, step by step. Learn the basics first, and dont worry about the project. The content of this article is limited to my known SWT and Swing scope, and I hope to be able to help people with SWT experience quickly.
The first difference is that the class library structure of SWT is not like Swing, without a single parent component. There are several parents in SWT:
Widgets - basic SWT GUI components (similar to components in Java AWT and JComponent in Swing). A Widget is an abstract class.
Control -- a widget that has an operating system counterpart (in other words, it has the same identity in the operating system). Control is an abstract class.
Composite -- controls that contain other controls (similar to the Container in Java AWT and JPanel in Swing).
Item -- the widgets that the other controls contain (this control may not be composite), such as lists and tables. Note that controls that contain items rarely contain other controls, and vice versa. Item is an abstract class.
SWT components cant inherit, its source code will mark: IMPORTANT: This class is not intended to be subclassed. If you do that, run the SWT system will be an error, cant contain any child components. Certain components, such as Tree, can only receive TreeItem as its child component. This way, when writing reusable graphical components, note that the writing in Swing cannot be applied directly to SWT.
All of Swings graphical interface classes inherit from java.awt.container, which means that all Swing components can contain any child component, or they can be inherited. This is the first difference between the two libraries.
Second difference is SWT without using Java own garbage collection function to manage the object is destroyed, most of the objects you must call the dispose () to complete the release of resources.
您可能关注的文档
- intel 945G主板(国外英文资料).doc
- Intel CPU 型号大全(国外英文资料).doc
- Intel 集成显卡简史(国外英文资料).doc
- intouch DAserver配置(国外英文资料).doc
- int为什么是-32768到32767(国外英文资料).doc
- IO fence详解(国外英文资料).doc
- IPCop全功能防火墙(国外英文资料).doc
- IPSEC加密(国外英文资料).doc
- ip地址与网络上的其他系统有冲突的解决办法(国外英文资料).doc
- ip地址划分为a类b类c类的原因(国外英文资料).doc
- 鲁科版四上 Unit 2-Lesson2 She likes dancing课件PPT.pptx
- 鲁科版四上 Unit 1-Lesson3We sing here课件PPT.pptx
- 鲁科版四上 Unit 1-Lesson4 Again please课件PPT.pptx
- 鲁科版四上 Unit 3-Lesson2 I can dance on Friday课件PPT.pptx
- 鲁科版四上 Unit 2-Lesson3 What's your hobby课件PPT.pptx
- 鲁科版四上 Unit 1-Lesson1 We have Chinese课件PPT.pptx
- 鲁科版四上 Unit 2-Lesson4 Again please课件PPT.pptx
- 鲁科版四上 Unit 3-Lesson1 What day is today课件PPT.pptx
- 鲁科版四上 Unit 3-Lesson4 Again, please课件PPT.pptx
- 鲁科版四上 Unit 1-Lesson2What's your favourite subject课件.pptx
最近下载
- 误差理论与数据处理第六版答案.docx VIP
- 优秀小学生成长档案手册成长简历模板(A4打印版本) .pdf VIP
- 构美-空间形态设计智慧树知到期末考试答案2024年.docx
- 重大危险源(储罐区、库区和生产场所)安全监控通用技术规范(征求意见稿).doc
- 三科2009-2016期末试卷1213审计学期末考试卷.pdf VIP
- 老有“所”舞——广州市逸景翠园居住区广场舞空间现状调研报告(终).pdf VIP
- 超声清洗_教程.ppt VIP
- 五年级上册人音版音乐:第4课《外婆的澎湖湾》示范课PPT.pptx
- 3三甲医院评审追踪检查流程-药事管理.pdf VIP
- 劳动教育课程-电子教案.docx VIP
文档评论(0)