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发行说明。
JFC is short for Java Foundation Classes, which encompass a group of features for building graphical user interfaces (GUIs) and adding rich graphics functionality and interactivity to Java applications. JFC是java基础类的缩写,它包含一组用于构建图形用户界面(GUI)的特性,并向java应用程序添加丰富的图形功能和交互性。It is defined as containing the features shown in the table below.定义为包含下表所示的特征。
Java 2D API | |
This trail concentrates on the Swing components. 这条线索集中在Swing组件上。We help you choose the appropriate components for your GUI, tell you how to use them, and give you the background information you need to use them effectively. 我们帮助您为GUI选择合适的组件,告诉您如何使用它们,并为您提供有效使用它们所需的背景信息。We also discuss other features as they apply to Swing components.我们还讨论了应用于Swing组件的其他特性。
The Swing API is powerful, flexible — and immense. Swing API功能强大、灵活—并且巨大。The Swing API has 18 public packages:Swing API有18个公共包:
javax.accessibility |
javax.swing.plaf |
javax.swing.text |
javax.swing |
javax.swing.plaf.basic |
javax.swing.text.html |
javax.swing.border |
javax.swing.plaf.metal |
javax.swing.text.html.parser |
javax.swing.colorchooser |
javax.swing.plaf.multi |
javax.swing.text.rtf |
javax.swing.event |
javax.swing.plaf.synth |
javax.swing.tree |
javax.swing.filechooser |
javax.swing.table |
javax.swing.undo |
Fortunately, most programs use only a small subset of the API. 幸运的是,大多数程序只使用API的一小部分。This trail sorts out the API for you, giving you examples of common code and pointing you to methods and classes you're likely to need. 本教程为您整理API,提供常见代码的示例,并为您指出可能需要的方法和类。Most of the code in this trail uses only one or two Swing packages:本教程中的大多数代码仅使用一个或两个Swing包:
javax.swing
javax.swing.event