Java中的AWT和Swing之间的区别

Here you will learn about difference between AWT and Swing in Java.
在这里,您将了解AWT和Java中的Swing之间的区别。
AWT and Swing both are used to create GUI interface in Java. Both of them are used to perform almost same work, still they differ from each other. In this tutorial I have shared about some differences between AWT and Swing.
AWT和Swing都用于在Java中创建GUI界面。 两者都用来执行几乎相同的工作,但它们仍然彼此不同。 在本教程中,我分享了AWT和Swing之间的一些区别。
Difference between Abstract Class and Interface in JavaJava中抽象类和接口之间的区别

Java中的AWT和Swing之间的区别 (Difference between AWT and Swing in java)

AWT
Swing
AWT stands for Abstract Window Toolkit.
Swing is a part of Java Foundation Class (JFC).
AWT components are heavy weight.
Swing components are light weight.
AWT components are platform dependent so there look and feel changes according to OS.
Swing components are platform independent so there look and feel remains constant.
AWT components are not very good in look and feel as compared to Swing components. See the button in below image, its look is not good as button created using Swing.
Difference between AWT and Swing
Swing components are better in look and feel as compared to AWT. See the button in below image, its look is better than button created using AWT.
AWT
摇摆
AWT代表“抽象窗口工具包”。
Swing是Java基础类(JFC)的一部分。
AWT组件很重。
Swing部件重量轻。
AWT组件取决于平台,因此外观和感觉会根据OS进行更改。
摆动组件独立于平台,因此外观保持不变。
与Swing组件相比,AWT组件在外观和感觉上都不太好。 请参见下图中的按钮,其外观不如使用Swing创建的按钮好。
Difference between AWT and Swing
与AWT相比,Swing组件的外观和感觉更好。 请参见下图中的按钮,其外观比使用AWT创建的按钮更好。
If you know about any other difference between AWT and Swing than please mention it by commenting below.
如果您不了解AWT和Swing之间的任何其他区别,请在下面评论中提及。

翻译自: https://www.thecrazyprogrammer.com/2015/04/difference-between-awt-and-swing-in-java.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值