比较类似术语之间的差异

迪fference Between

家 / Technology / IT / 编程 /迪fference Between AWT and Swing

迪fference Between AWT and Swing

February 5, 2018Posted byLithmee

Key Difference – AWT vsSwing

Java是一个high-level programming languagedeveloped by Sun Microsystems.JavasupportsObject Oriented Programming这有助于使用对象设计和开发软件。汇编Java程序后,将其转换为字节码。该字节码在任何平台上都由Java Virtual Machine(JVM)解释。因此,它是一种编程语言,程序员可以编写一次并在任何平台上运行。Java可用于开发各种应用程序,例如桌面,移动和Web应用程序。该语言提供了创造丰富的工具包图形用户界面(GUI). Two of them are AWT and Swing. This article discusses the difference between AWT and Swing. Thekey differencebetween AWT and Swing is thatawtis Java’s original platform dependent windowing, graphics, and user interface widget toolkit while Swing is a GUI widget toolkit for Java that is an extension for AWT.

内容

1.Overview and Key Difference
2.What is AWT
3.What is Swing
4.AWT和秋千之间的相似之处
5.Side by Side Comparison – AWT vs Swing in Tabular Form
6。概括

什么是AWT?

A Graphical User Interface is an interface for users to provide instructions for the software to perform tasks. It consists of various graphical components. Some GUI components are window, button, combo box, text area, list box, and label. Using these components, the programmer can develop an interactive user interface for the application. A GUI is based on events. Button click, closing the window, typing something in the textbox are some examples of events that can occur in a Graphical User Interface based application. Today many applications contain GUIs. Mobile applications, Air ticket reservation systems, Automated Teller Machines have rich graphical interfaces for customers to use the application easily.

AWT代表Abstract Window Toolkit. AWT requires a native OS object to implement the functionalities. Therefore, AWT components are heavyweight and require more memory space. AWT components also take time to execute. The number of components available in AWT is minimum. It is necessary to import javax.awt package to develop an AWT based GUI applications.

迪fference Between AWT and Swing

图01:AW和秋千

一些AWT组件是按钮,文本字段,下拉框,滚动条,窗口,框架,面板,标签。创建对象后,可以将它们放入容器中。一个容器为组件加载的空间提供了空间。AWT不支持可拉的外观和感觉。因此,在一个操作系统中开发的AWT应用程序可能在另一个操作系统中看起来不一样操作系统.

What is Swing?

Swing is a GUI widget toolkit for Java. It is a part of Oracle’s Java Foundation Classes (JFC). It is an Application Programming Interface to build GUI for Java applications. It is built on top of AWT API. Swing was developed to provide more flexible and sophisticated components than AWT. Swing contains basic components such as labels, text boxes, buttons. It also contains more advanced components. Some of them are trees, tables, lists, scroll panes and tabbed panes. If the programmer needs to implement a Swing application, it is necessary to import javax.swing package. The package provides classes for Java Swing API such as JButton, JRadioButton, JTextField, JCheckbox etc.

摆动组件没有特定于平台的代码。因此,秋千是独立的平台。与AWT不同,Swing不需要本机操作系统来构建组件。JVM负责调用本机方法。秋千组件很轻。所需的内存空间也最小。这是更快地运行基于挥杆的应用程序的相当大的因素。在应用程序开发中,模型,视图,控制器(MVC)是一种常见的设计模式。该模型代表数据。该视图代表演示文稿,而控制器是模型和视图之间的接口。 Swing follows this pattern. Swing supports the pluggable look and feel. Overall, it is more powerful than AWT.

What is the Similarity Between AWT and Swing?

  • Both are Java-based toolkits to build Graphical User Interface.

What is the Difference Between AWT and Swing?

AWT与秋千

AWT是Java的原始平台依赖窗口,图形和用户界面窗口小部件在秋千前。 Swing is a GUI widget toolkit for Java which is a part of Oracle’s Java Foundation Class (JFC).
平台依赖性
awtcomponents are platform dependent. Swing components are platform independent.
数量的组件
awtcontains less number of components. Swing has a higher number of components.
Components
AWT组件是重量级的。 秋千组件是轻量级的。
MVC
awtdoes not follow MVC. 秋千跟随MVC。
速度
AWT不像秋千一样快。 Swing is faster than AWT.
所需的内存空间
awtcomponents require more memory space. Swing components require less memory space.
Required Package
awtrequires importing javax.awt package. Swing requires importing javax.swing package.
Pluggable Look and Feel
AWT不支持可拉的外观和感觉。 Swing provides a pluggable look and feel.

概括–awt vsSwing

本文讨论了两个AW和Swing的图形用户界面设计工具。AWT和Swing之间的区别在于AWT是Java的原始平台依赖窗口,图形和用户界面小部件工具包,而Swing是Java的GUI小部件工具包,这是AWT的扩展名。秋千提供了与AWT相比的更丰富的功能。使用秋千建造的GUI的外观看起来比AWT的GUI更好。与AWT不同,Swing支持可凹陷的外观和感觉,并提高应用程序的可用性。

Download the PDF Version of AWT vs Swing

You can download the PDF version of this article and use it for offline purposes as per citation note. Please download the PDF version here:迪fference Between AWT and Swing

Reference:

1.tutorialspoint.com. “SWING Overview.”The Point.Available here
2.“Swing (Java).” Wikipedia, Wikimedia Foundation, 24 Jan. 2018.Available here
3.“Abstract Window Toolkit.” Wikipedia, Wikimedia Foundation, 22 Jan. 2018.Available here
4.“Java Swing Tutorial – javatpoint.”Available here
5.tutorialspoint.com. “AWT Overview.”The Point.Available here

Image Courtesy:

1.’AWTSwingClassHierarchy’ By Jakub Závěrka – Jakub Závěrka – own work, (Public Domain) viaCommons Wikimedia

相关文章:

迪fference Between Agile and Scrum 回声和印刷之间的区别 Java和Oracle之间的区别 DLL和LIB之间的差异 迪fference Between ASP and ASP.NET

Filed Under:编程标记为:Abstract Window Toolkit,awt,awtand Swing Differences,AW和摇摆相似之处,awtAppearance,awtComponents,AWT定义,awtMemory,awtPlatform,AWT速度,AWT与秋千,Compare AWT and Swing,swing,Swing Appearance,Swing Components,Swing Definition,Swing Memory,Swing Platform,Swing Speed

关于the Author:Lithmee

Lithmee Mandula是计算机系统工程的孟加(荣誉)。她目前正在攻读计算机科学硕士学位。她在写作和研究方面的兴趣领域包括编程,数据科学和计算机系统。

发表评论取消回复

Your email address will not be published.Required fields are marked*

请求文章

Featured Posts

迪fference Between Coronavirus and Cold Symptoms

迪fference Between Coronavirus and Cold Symptoms

冠状病毒和SARS之间的差异

冠状病毒和SARS之间的差异

迪fference Between Coronavirus and Influenza

迪fference Between Coronavirus and Influenza

迪fference Between Coronavirus and Covid 19

迪fference Between Coronavirus and Covid 19

你可能喜欢

迪fference Between Climate Change and Global Warming

迪fference Between Climate Change and Global Warming

摩托罗拉Xoom 2和iPad 2之间的差异

沮丧和拒绝之间的区别

沮丧和拒绝之间的区别

迪fference Between Thermal Decomposition and Thermal Dissociation

迪fference Between Thermal Decomposition and Thermal Dissociation

迪fference Between Shire and Council

Latest Posts

  • What is the Difference Between Cellulite and Lipedema
  • 动力素和Zeatin有什么区别
  • 过氧化苯甲酰和苄基苯甲酸酯有什么区别
  • What is the Difference Between Sebum and Sweat
  • L肉碱和乙酰基L肉碱有什么区别
  • What is the Difference Between Orthostatic Hypotension and Vasovagal Syncope
  • 家
  • Vacancies
  • 关于
  • 请求文章
  • 联系我们

Copyright © 2010-2018迪fference Between. All rights reserved.Terms of Use和隐私政策:合法的.