-
Less startup time. Because AWT components are native components which are implemented by the operating system, most of the binary codes can be loaded in advanced, for example, when operating system starts. This can help to reduce AWT application startup time.
-
More responsive, Because native components are rendered by operating systems.
-
Standard GUI toolkit supported by JRE since java 1.x time. You don't have to install them separately. You don't have to worry about platform differences.
-
Mature and stable. Seldom will it crash you applications and it just works.
- 浏览: 593573 次
- 性别:
- 来自: 厦门
文章分类
最新评论
-
phil09s:
写的真简洁!就怕搞不定!
SWT,打包发布SWT程序,转EXE一条龙过程记录 -
stona126:
楼主能给出这个Java高级图像处理I/0工具包的下载地址吗?谢 ...
java图像处理 -
chen_jp:
非常好,谢谢!
C++各大有名库的介绍——GUI -
effort_fan:
学习了。
一个Java画图板程序的设计 -
zhongxinhu:
谢谢,刚好在你这里找到答案!
关于java 读取propterties 文件的疑惑 和问题的解决[转载]
AWT, SWT, Swing: Java GUI Clean Up (4)
原文:http://blogs.sun.com/Swing/entry/awt_swt_swing_java_gui3
作者:williamchen
译者:Matthew Chen
备注:翻译好累,但是第4篇是最有料的,我又不得不用红字写一些看法了。
Pros & Cons
To conclude the article, I'll give a list of pros & cons for each of them from a technical perspective.
我从一个技术层面给出了他们优劣势上的一个清单,以结束本文。
AWT
AWT is a deprecated toolkit by Sun. However, it does has advantage. In many areas other than desktop environment such as mobile or embedded device, AWT has many advantages.
AWT是Sun不推荐使用的工具集。然而它在许多非桌面环境如移动或嵌入式设备中有着自己的优势。[SWT因相同的理由在mobile环境中也具有优势,那Android呢。Java是世界上用得最广泛的编程语言,然而分裂和变异是生命体进化的必然,java guys,你准备好面对即将到来的一切了吗?]
Less memory. Therefore it is suitable for developing GUI application which runs in an limited environment, for example, mobile phone and so on.
更少的内存。它对运行在有限环境中的GUI程序的开发,是合适的。
1. 更少的启动事件。由于AWT组件是本地由操作系统实现的。绝大多数的二进制代码已经在如系统启动的时候被预装载了,这降低了它的启动事件。
2. 更好的响应。由于本地组件由操作系统渲染。
3. 从java 1.x时代就为JRE支持的标准GUI工具集,你不用单独安装它,你不用担心平台差异的问题。
4. 成熟稳定的。它能够正常工作并很少使你的程序崩溃。
However, everything has its own Achilles heel. Let's enumerate them:
然而,事物都有它们不好的一面。让我们来例数它吧。
-
Less component types. Table and tree are very important components missing. while table and tree are very commonly used components in desktop applications.
-
Lacking rich component feature. Its buttons cannot have icon attached. This is clearly due to the fact, it is design according to principle.
-
No Look And Feel support. AWT is designed to use native components. Therefore, it depends on the system to provide Look And Feel support. If there are no such support on the target platform, there's no way for AWT to change its look and feel.
-
Not extensible. AWT components are native components. The JVM instance of AWT classes are in fact only references to the native components. The only extension point of AWT is its Canvas component, where you can create a custom component from scratch. However there's no way to extends and reuse an existing AWT component.
1. 更少的组件类型。表和树这些重要的组件缺失了。它们是桌面应用程序中普遍使用的。
2. 缺乏丰富的组件特征。按钮不支持图片附着。这很明显是它遵循的设计原则造成的。
3. 不支持Look And Feel。AWT被设计为使用本地组件。因此,它依赖系统来提供Look And Feel支持。如果目标系统并不支持这一特性,那么AWT将无法改变它的Look And Feel。
4. 无扩展性。AWT的组件是本地组件。JVM中的AWT类实例实际只是包含本地组件的引用。唯一的扩展点是AWT的Canvas组件,你可以从零开始创建自定义组件。然而无法继承和重用一个已有的AWT组件。[SWT同样,extends在这里的使用确实不如Swing可以做到的事情多,但别忘了原生只是人们加给SWT的一个名字而已,它的姓是IBM]
SWT
SWT has the following advantages:
SWT有如下优势:
-
Rich component types. SWT provide a wide variety of components, from primitive components such as Buttons and Labels to Tables and Trees.
-
Relative rich component feature. Although SWT is also designed following LCD principle, it has been re-engineered to support more component features by emulations. So compared to AWT, it has relative more component features.
-
Better response time. Due to the same reason as AWT, SWT components are wrapped native components, which are rendered by the operating system. Operating system can usually optimize the rendering process. It often store the GUI binaries as shared library, which reduces memory footprint, therefore improve the response performance.
-
Less memory consumption. It is easy to understand this point, since operating system can take care of the native components for applications.
1. 丰富的组件类型。SWT提供了种类繁多的组件,从基础组件如按钮和标签到高级的表格和树。
2. 相对的丰富组件特性。尽管SWT也遵循最大公倍数原则,它可以采用模拟的方式重新设计了对更多组件特性的支持。所以同AWT相比,它有着相对丰富的组件特性。
3. 更快的响应时间。基于和AWT同样的原因,SWT组件包装了本地组件,由操作系统实现渲染。操作系统通常对渲染处理做了优化,保存GUI二进制代码为标准库,减少了内存的使用,提高了响应性能。
4. 更少的内存消耗。既然操作系统为本地组件提供了优化,这一点就容易理解了。
[之前的文章说过组件类型和特征(有时也有特性)这两个概念,三者分别基于两类组件使用原则实现,本地模拟比起真正的仿真模拟确实有不足之处,这种不足并不仅仅是效果上的缺失,见下面的数据输送时间部分]
As to disadvantages:
不足之处:
-
Not a standard library shipped by JRE. Therefore you have to bundle them together with your applications. Also you have to build separate installers for every operating systems which you are to support.
-
Immature and unstable. SWT due to its many design defect, for example resource management, and Windows-friendly design, is said to be unstable. It can perform very well on Windows. But on non-Windows operating systems, it is unstable and crashes very often. This is largely due to the fact that SWT leaves the resource management task to developers. However, not all developers can handle resource management correctly.
-
Bad performance on non-Windows. As it is mentioned in No. 2, SWT is designed to accommodate Windows API, which results in bad performance on non-Windows platforms. The end results include slow performance, bad UI feelings, unstable or even memory leaks.
-
No Look And Feel support. The same reason as those of AWT.
-
Not extensible. The same reason as those AWT. In SWT, you can extend the component in a limited manner. For example, you can listen to the PAINT event and add custom drawing on the component. But it is very limited, since you can only control part of drawing process. You can only make up after the operating system draws the component. This is very bad for customization. Many modern applications needs such ability to provide customized behavior.
1. 不在JRE的标准库中。因此你必须将它和你的程序捆绑在一起,并为你所要支持的每个操作系统创建单独的安装程序。
2. 不够成熟和稳定。SWT因其设计上的一些缺陷,如资源管理,Windows友好等,被认为是不稳定的。它可以在Windows上表现得很好,但在其他操作系统上,它经常是不稳定且容易崩溃的。这很大程度上是因为它把资源管理交给开发者来处理,而并不是所有的开发人员能够正确地处理这些。
3. 在非Windows平台下的性能不高。如同第2点提到的,SWT被设计为与Windows API相协调的,这导致了在非Windows平台上的性能问题,糟糕的UI感官,不稳定甚至内存泄露。
4. 无Look And Feel 支持。和AWT同样的原因。
5. 不可扩展,和AWT同样的原因。在SWT中你可以通过有限的方式扩展一个组件,例如,监听PAINT事件并添加自定义绘图到组件上,但鉴于你只能控制绘制处理的一部分,这是十分有限的。你也只能在操作系统绘制完组件后补充,这并不能很好支持自定义。许多应用程序在自定义行为上有很高的要求。
[并不是所以的非Windows平台都是美观的mac或ubuntu,薄弱的操作系统图形支持在大的范围内是及其普遍的。]
Swing
Swing is the most powerful GUI toolkits. It has many advantages as well as disadvantages over the other two.
Swing是三者中最强大的GUI工具集。它和另外两者相比同样有自己的优劣势。
-
Rich component types. Swing provide very wide variety of standard components. These components are as rich as those SWT. Besides these standard components, Swing has a lots of third part components, due to its extensible nature. There are many commercial and open source swing libraries on market after years of development. 丰富的组件类型。Swing提供了非常广泛的标准组件。这些组件和SWT一样丰富。基于它良好的可扩展性,除了标准组件,Swing还提供了大量的第三方组件。许多商业或开源的Swing组件库在开发多年后都已经可以方便地获取了。[标准库中确实谈不上全面,但第三方组件的加入绝对媲美SWT了]
-
Rich component features. Not only swing combines all the feature on every platform, it can even provide additional feature according to the platform the applications are running on. Swing component features are designed following principle. And also swing components are very easy to be extended, therefore, swing components can usually provide much more functionalities than its SWT and AWT counterparts.丰富的组件特性。Swing不仅包含了所有平台上的特性,它还支持根据程序所运行的平台来添加额外特性。Swing组件特性遵循特定原则,易于扩展,因此能够提供较SWT和AWT更多的功能。
-
Good component API and model support. Swing is designed following MVC pattern, which is proved to be a very successful design pattern. Its API are mature and well designed. After years of evolution, Swing component APIs are becoming more and more powerful, flexible and extensible. Its API design is considered to be one of the most successful GUI API. They are more Object-Oriented, more flexible and more extensible compared to SWT and AWT. 好的组件API好模型支持。Swing遵循MVC模式,这是一种非常成功的设计模式。它的API成熟并设计良好。经过多年的演化,Swing组件APIs变得越来越强大,灵活和可扩展。它的API设计被认为是最成功的GUI API之一。较之SWT和AWT更面向对象,也更灵活而可扩展。
-
Excellent Look And Feel support. MVC design model enables Swing the ability to separate component view from its data model. It has superior UI delegation which delegate UI rendering to UI classes. These classes are registered in an object, which represents a specific Look And Feel. There are now hundreds of LookAndFeel libraries available, which provides all kinds of different flavors of GUI styles. You can even write your own LookAndFeel based on others work. 出色的Look And Feel支持。MVC设计模型允许Swing分离组件试图和它的数据模型。它有高级的UI委托来将UI渲染委托给UI类。这些类被注册到一个展现特定的Look And Feel的对象上。已经有上百个Look And Feel 可以提高各种各样的GUI风格。你甚至可以基于其他人的成果编写组件的Look And Feel 。
-
Standard GUI library. Swing as well as AWT is a standard library of JRE. Therefore, you don't have to ship them separately with your application. You don't have to worry about platform incompatibility since they are platform independent.标准的GUI库。Swing和AWT一样是JRE中的标准库。因此,你不用单独地将它们随你的应用程序一起分发。它们是平台无关的,所以你不用担心平台兼容性。
-
Stable and mature. Swing has been developed for more than 7 years. It is becoming more and more mature and stable especially after Java 5. Since it is purely implemented in java, therefore, it has not such compatibility issues as those of SWT. Swing performs equally on every platforms. There are no drastically performance difference between them.成熟稳定。Swing已经开发出来7年之久了。在Java5之后它变得越来越成熟稳定。由于它是纯Java实现的,不会有SWT的兼容性问题。Swing在每个平台上都有相同的性能,不会有明显的性能差异。
-
Extensible and flexible. Swing is a library entirely implemented in Java space. Therefore, it controls everything it needs. The architecture of Swing conforms to MVC pattern which exerts many of the advantage of Java as an Object-Oriented languages. In fact, it provides several ways to extend the components. Let me briefly enumerate them. A. Extend existing components. B. Extending by composite components. C. Writing custom components using Jcomponent from scratch. D. Using renderer and editor mechanism to extend complex swing components such as Jlist, JcomboBox, Jtable, Jtree etc. E. Creating a new LookAndFeel either by extending existing LookAndFeel or writing a new one from scratch. F. Using LayeredPane, GlassPane or Drag and Drop mechanism to develop advanced components, such as docking components, custom popup windows, custom menus etc. 可扩展和灵活性。Swing完全在Java空间中实现。它可以控制它所需要的一起。Swing基于MVC的结构使得它可以发挥Java作为一门面向对象语言的优势。它提供了许多扩展组件的方法。让我们来列举一下:A.继承已有组件;B.靠复合组件的方式扩展。C.从零开始使用JComponent编写自定义组件;D.使用渲染器和编辑器机制扩展复制的Swing组件,如JList,JComboBox,JTable,JTree等;E.基于已有Look And Feel 或从零开始创建新的Look And Feel;F.使用LayeredPane,GlassPane或拖放机制开发高级的组件,例如浮动的固定组件,自定义弹出窗口,自定义菜单等。[这是一种好的机制,但你不能指望别人永远无法超越你。]
-
Good overall performance. Swing has ever been mocked for its speed. However, with the development of JRE, Swing is performing better and better now. Especially after Java 5, Swing's overall speed can compete with any native widget systems. 总体上良好的性能。Swing的速度是其为人诟病的一点。然而随着JRE的开发,Swing的性能如今已经有了很大的提高。特别是Java5之后,Swing的总体速度能够接近本地小控件系统。
A GUI speed can usually be measured in two aspects. One is response time, and the other is data feeding time.
一个GUI的速度总是从两个方面被衡量:响应时间和数据反馈时间。
Response time means the period between the time an event takes place and the time the component updates its UI. For example pressing a button, dragging a component, changing a tabbed pane selection, etc. In this aspect, native components usually have better response time than an emulated one. AWT and SWT components usually have better response time than those of Swings. However this is not always true. It depends on the operating systems. If native components are not implemented well on that platform, it might be the contrary. For example, Windows usually have their GUI library polished very well, while Linux platforms usually don't do well. Therefore, SWT can perform better than Swing on Windows, but might perform worse than Swing on Linux. In one word, the performance of AWT/SWT depends the underlying platforms. With the development of JRE, Swing response performance has been greatly enhanced due to JVM optimization, better swing implementation, graphics hardware acceleration etc. Swing in Java 6 can even compete with SWT on Windows. On non-Windows, Swing has much better response time than SWT.响应事件指从事件任务出现到组件更新UI的这段时间。例如按下一个按钮,拖动一个组件,改变一个多标签面板等。在这个方面本地组件总能比模拟组件有更好的响应。AWT和SWT通常比Swing表现出更好的响应时间。然而事实并非总是如此。这取决于操作系统。如果本地组件没有被良好的实现,那结果就是相反的。例如Windows开发了不错的GUI库,而Linux平台通常差得较远。SWT可能在Windows上表现得比Swing好,而在Linux上表现得比Swing差。也就是说,AWT/SWT的性能决定于底层平台。随着JRE的开发,Swing的响应性能能够随着JVM的优化,更好的实现方式,以及图形硬件加速而得到长足的改进。在Windows上,Java6的Swing可以媲美SWT的性能。在非Windows环境中,Swing可以表现出更好的响应时间。
Data feeding time means the time that is taken to transmit application data to UI components. For example, a student management software is asked to load some students information from the database and display them on a table. The time spent on transmitting those students from the memory to the table components is called feeding time. In this aspect, Swing usually performs better than the other two. It is not so obvious when there are not much data to be fed. But if there are tremendous data to be fed into the table, it is becoming more and more noticeable. Why? To understand it, you have to be reminded that JVM and native operating systems are two separate running environment. JNI call made by java program usually consumes much more time than ordinary java call. It is obvious that JNI call is an action that spans two different systems. When a JNI invocation happens, it usually involves two process. One is that Java data structure is translated into native system structure. And second, when a method returns, the returned values should also be translated into java objects. Not to mention other performance costs. When a large bound array of data are fed to native component, there will be large amount of JNI call which can drastically slow down the performance. 数据输送时间是指用于将应用程序数据传递给UI组件所需要的时间。例如,一个学生管理系统要求从数据库中装载学生信息并在一个表格中显示出来。花费在从内存到表格组件的数据传递时间被称为数据输送时间.在这个方面,Swing通常比其他二者的性能更好。或许当数据量不大的情况下并不明显。但当海量的数据被输送给表格的时候,这一点就显而易见了。为了理解这一点,提醒你注意JVM和本地操作系统是两个分离的运行时环境。由于JNI的调用在两个环境中跨越式地发生,通常比一个普通的Java调用花费更长的时间。通常这包含两个处理。一个是Java数据结构转换为本地数据结构,另一个是方法返回时的本地数据结构转换为Java对象。其他的性能开销暂时忽略不计。当一个大范围数组的数据从本地组件中输送过来,大量反复的JNI调用将极大地拖垮性能。[记起了blogjava上阿南的那个问题,或许,正是这个原因吧,数组也是对象,所以转换也不会是简单的]
And anther swing advantage is that it has many component models which can speed up the feeding performance greatly. For example tablemodel can be mapped to a two dimension array. In such case, there is even no data transmission happened in Swing components. Swing table directly displays the application data to the screen, greatly eliminating the time spent on data transmission.
Swing的另一个优势是它有许多的组件模型以提高输送的性能。例如TableModel被映射为两个维度上的数组。这样,在Swing组件中甚至不需要进行数据方式的转换。Swing表直接将应用程序数据显示在屏幕上,节省了在数据转换上所花费的事件。
As to Swing's disadvantages:
Swing也有不足之处:
-
More memory consumption than AWT and SWT. Swing has all its components implemented by itself. Therefore, it has much more classes to be loaded in runtime. There are some other issues such as small mutable object creation, such as Rectangle, Point etc, these objects usually cannot be re-used due to synchronization consideration. Java creates all the objects on the heap. And small objects can often waste heap space. These small objects garbages can not be collected efficiently compared to large objects. Therefore, Swing application often creates a lots of small objects which can not be collected in time. More often it can result in performance degradation.比AWT和SWT更多的内存消耗。Swing自己实现了所有组件。因此,它在运行时装载了大量的类。一些其他的问题来源于小的可变对象的创建,如Rectangle,Point,这些对象基于同步的考虑通常不可重用。Java在堆上创建所以对象。小的对象通常导致了额外的堆空间消耗。许多小的对象较之大对象更难以有效地被垃圾回收。因此,Swing应用程序通常无法及时回收大而小的对象。这种情况的普遍就会导致性能下降。[通过研读一些gc方面的文章,你会对gc有更深入的了解,并懂得如何设计好的对象使用方式和生命周期。另外,component.getBounds(r)之类的方法不会自己创建新的Rectangle,也算一个变通吧]
-
More application startup time. Now JVM is fast enough. Some people even said it can even compete with some C++ implementation. But still there are some java application which seem to be very slow. In fact, many java performance issues are caused by class loading. Class loading is an I/O operation which can greatly slow down java applications. Perhaps this is the issue that every dynamic linking system must face. Swing application usually involves thousands of thousand Swing classes. Before Swing application can show its main window, it has loaded much more classes than AWT and SWT applications. This can greatly increase Swing application startup time. If Swing classes are pre-loaded as shared system libraries, this issue can be resolved easily. 更多的启动时间。现在JVM已经快得多了。许多人甚至扬言它可以媲美C++的实现。但多数的Java应用程序还是看上去很慢。实际上,Java性能的很多问题来源于类装载机制。这是一个I/O操作,故而能够明显地降低Java应用程序的速度。也许这是每个动态链接系统中都要面对的问题吧。Swing通常包含了上千个Swing类的使用,在Swing应用程序可以显示它的主窗口之前,它比AWT或SWT装载了多得多的类。这严重降低了Swing的启动时间。这种问题也许会相对好一点如果Swing的类是以共享系统库的方式预加载的。[冷启动的问题吗?这种机制是操作系统的特性了,java可能以系统服务的方式出现吗?这个可要好好论证不能盲目做]
The above comparison is mainly conducted in technical perspective. There are many other terms which should be considered when you choose a toolkit. For example, documentation, support, learning curves and community etc. But since we are focusing their technical sides, we shall not detail them here.上述的比较总的来说是技术上的总结。相对其他方面的因素也会影响你对一个工具集的选择。例如,文档,支持,学习曲线和社区等,但既然我们关注的是技术层面,就不在这里讲的太多了。
(End)
相关推荐
在Java中,有三个主要的GUI工具包:AWT(Abstract Window Toolkit),SWT(Standard Widget Toolkit)和Swing。 1. AWT(Abstract Window Toolkit): AWT是Java最早提供的GUI库,它是Java的基础GUI组件集合。AWT...
通过`java图形编程1-AWT.chm`和`java图形编程2-Swing.chm`这两个文档,你可以深入学习AWT和Swing的使用方法,了解组件的创建、布局管理、事件处理、模型-视图-控制器模式,以及如何利用Swing的高级功能来构建复杂的...
AWT(Abstract Window Toolkit)和Swing都是Java用于构建图形用户界面(GUI)的库,它们各有特点,但在很多方面存在显著差异。了解这些差异有助于开发者根据项目需求选择合适的技术。 1. **组件的实现方式** - **...
在介绍AWT、Swing、SWT之前,我们先来简单了解一下图形用户界面(GUI)的概念及其在Java开发中的重要性。随着计算机技术的发展,用户与计算机之间的交互方式也在不断进化。从最初的命令行界面(CLI)到如今广泛使用的...
Java提供了多种图形用户界面(GUI)编程的选项,其中最基础的两种是抽象窗口工具集(Abstract Window Toolkit,简称AWT)和Swing。这两种技术都允许开发者创建和管理GUI组件,但它们在设计哲学、功能和使用方式上...
它提供了三个主要的工具包:SWT(Standard Widget Toolkit)、Swing和AWT(Abstract Window Toolkit)。这三个工具包各有特点,适用于不同的开发场景。 AWT是Java最早的GUI工具包,它是Java平台的基础,包含了基本...
3. **第十八章_图形界面开发--AWT,Swing,SWT.pdf** - 这个章节可能涵盖了AWT、Swing以及另一个GUI库SWT(Standard Widget Toolkit)的比较和使用,SWT是Eclipse IDE所采用的GUI库,它结合了AWT和Swing的优点。...
Java是一种广泛使用的编程语言,在图形用户界面(GUI)设计领域提供了多种开发包,其中比较著名的有Swing、SWT和AWT。这三种技术各有特点和适用场景,在开发Java图形界面应用时,开发者需要根据实际需求选择最合适的...
在Java编程环境中,SWT(Standard Widget Toolkit)和AWT(Abstract Window Toolkit)以及SWING是三种常用的图形用户界面(GUI)开发库。SWT主要为Eclipse IDE提供支持,而AWT和SWING则是Java标准库的一部分。这篇...
Swing是Java标准库中的一个GUI工具包,它为开发者提供了丰富的组件和功能,以构建美观且功能强大的用户界面。本资源"100个JavaGUI+SwingDemo大全"是一个全面的教程集合,包含了大量的示例代码,旨在帮助开发者深入...
在Java编程领域,AWT(Abstract Window Toolkit)和Swing是两个重要的图形用户界面(GUI)工具包,用于创建桌面应用程序。本项目“利用AWT和Swing实现Java个人空间应用程序源代码”提供了构建一个集成了计算器、...
本文主要介绍了Java GUI编程的三个主要工具集:AWT、Swing和SWT,并对其优缺点进行了比较。下面将对标题、描述、标签和部分内容进行详细的解释和分析。 标题: 浅析Java GUI编程工具集 标题表明了本文的主要内容,...
在Java编程领域,Swing、AWT和SWT都是用于构建图形用户界面(GUI)的框架。本篇文章将详细介绍如何在Eclipse集成开发环境中(IDE)搭建这些框架的开发环境,以及可以使用的相关插件。 首先,让我们从AWT(Abstract ...
Java AWT(Abstract Window Toolkit)和Swing是Java平台上的两个图形用户界面(GUI)工具包,用于构建桌面应用程序。本项目"使用Java AWT和Swing实现的简单计算器"展示了如何利用这两个库创建一个基本的计算器应用。...
1. **Java AWT和Swing库**:Java提供两种主要的GUI工具包,Abstract Window Toolkit (AWT) 和 Swing。AWT是Java早期的GUI库,基于操作系统原生组件,而Swing是建立在AWT之上的轻量级框架,提供了更丰富的组件和更好...
4. **Swing组件**:Swing是Java GUI的主要工具包,它构建在AWT(Abstract Window Toolkit)之上,提供了更为丰富和现代的组件,如JFrame、JPanel、JScrollPane等。Swing组件是轻量级的,意味着它们在性能上优于AWT,...
在Java编程语言中,SWT(Standard Widget Toolkit)、AWT(Abstract Window Toolkit)和Swing是用于构建图形用户界面(GUI)的三个重要库。这三个库各有特点,但都提供了事件处理机制,允许用户与应用程序进行交互。...
在本实验报告中,主题是“Java实验报告之图形用户界面程序设计与AWT/Swing组件”,主要目标是让学生熟悉Java GUI设计原理、程序结构,掌握AWT和Swing组件的功能,以及学会应用这些组件来设计应用程序,特别是实现一...
Java提供了多种库来支持图形界面开发,包括AWT(Abstract Window Toolkit)、Swing和SWT(Standard Widget Toolkit)。这些库各自有不同的特点和应用场景。 - **AWT**:这是Java最早提供的图形界面工具包,主要通过...