The Java Tutorials have been written for JDK 8.Java教程是为JDK 8编写的。Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available.本页中描述的示例和实践没有利用后续版本中引入的改进,并且可能使用不再可用的技术。See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases.有关Java SE 9及其后续版本中更新的语言特性的摘要,请参阅Java语言更改。
See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases.有关所有JDK版本的新功能、增强功能以及已删除或不推荐的选项的信息,请参阅JDK发行说明。
Also known as The Swing Tutorial也称为Swing教程
This trail tells you how to create graphical user interfaces (GUIs) for applications and applets, using the Swing components.本教程介绍如何使用Swing组件为应用程序和小程序创建图形用户界面(GUI)。If you would like to incorporate JavaFX into your Swing application, please see Integrating JavaFX into Swing Applications.如果您希望将JavaFX合并到Swing应用程序中,请参阅将JavaFX集成到Swing应用程序中。
➤ Getting Started with SwingSwing起步 is a quick start lesson.这是一堂快速入门课。First it gives you a bit of background about Swing. Then it tells you how to compile and run programs that use Swing components.首先,它提供了一些关于Swing的背景知识。然后它告诉您如何编译和运行使用Swing组件的程序。
➤ Learning Swing with the NetBeans IDE使用NetBeans IDE学习Swing is the fastest and easiest way to begin working with Swing.是开始使用Swing的最快、最简单的方法。This lesson explores the NetBeans IDE's GUI builder, a powerful feature that lets you visually construct your Graphical User Interfaces.本课程探讨NetBeans IDE的GUI生成器,这是一个强大的功能,可以让您直观地构建图形用户界面。
➤ Using Swing Components使用Swing组件 tells you how to use each of the Swing components buttons, tables, text components, and all the rest.告诉您如何使用每个Swing组件:按钮、表格、文本组件以及所有其他组件。It also tells you how to use borders and icons.它还告诉您如何使用边框和图标。
➤ Concurrency in SwingSwing中的并发 discusses concurrency as it applies to Swing programming.讨论应用于Swing编程的并发性。Information on the event dispatch thread and the SwingWorker class are included.其中包括有关事件分派线程和SwingWorker类的信息。
➤ Using Other Swing Features使用其他Swing特性 tells you how to use actions, timers, and the system tray; how to integrate with the desktop class, how to support assistive technologies, how to print tables and text, how to create a splash screen, and how to use modality in dialogs.告诉您如何使用操作、计时器和系统托盘;如何与桌面类集成,如何支持辅助技术,如何打印表格和文本,如何创建初始屏幕,以及如何在对话框中使用模态。
➤ Laying Out Components Within a Container在容器内布置组件 tells you how to choose a layout manager, how to use each of the layout manager classes the Java platform provides, how to use absolute positioning instead of a layout manager, and how to create your own layout manager.告诉您如何选择布局管理器,如何使用Java平台提供的每个布局管理器类,如何使用绝对定位代替布局管理器,以及如何创建自己的布局管理器。
➤ Modifying the Look and Feel修改外观和感觉 tells you how to specify the look and feel of Swing components.告诉您如何指定Swing组件的外观。
➤ Drag and Drop and Data Transfer拖放和数据传输 tells you what you need to know to implement data transfer in your application.告诉您在应用程序中实现数据传输所需的知识。
➤ Writing Event Listeners编写事件侦听器 tells you how to handle events in your programs.告诉您如何处理程序中的事件。
➤ Performing Custom Painting表演定制绘画 gives you information on painting your own Swing components.提供有关绘制自己的Swing组件的信息。It discusses painting issues specific to Swing components, provides an overview of painting concepts, and has examples of custom components that paint themselves.它讨论了特定于Swing组件的绘制问题,提供了绘制概念的概述,并提供了绘制自己的自定义组件的示例。
Although this is the main trail for learning about GUIs, it isn't the only trail with UI-related information.尽管这是学习GUI的主要途径,但它并不是唯一一条与UI相关信息的途径。