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发行说明。
This lesson contains a collection of how-to pages to help you use miscellaneous Swing features.本课程包含一组指导页面,可帮助您使用各种Swing功能。
With the 使用Desktop
class you can enable your Java application to interact with default applications associated with specific file types on the host platform.Desktop
类,您可以使Java应用程序与主机平台上与特定文件类型关联的默认应用程序交互。
As of the Java Platform, Standard Edition 6 Update 10 release, you can add translucent and shaped windows to your Swing applications. 从Java平台,标准版6更新10发行版开始,您可以向Swing应用程序添加半透明和形状的窗口。This lesson shows you how.本课向您展示了如何操作。
JLayer
is a flexible and powerful decorator for Swing components. 是Swing组件的灵活而强大的装饰器。It enables you to draw on components and respond to component events without modifying the underlying component directly.它使您能够在不直接修改底层组件的情况下绘制组件并响应组件事件。
With 使用Action
objects, you can coordinate the state and event handling of two or more components that generate action events. Action
对象,可以协调生成操作事件的两个或多个组件的状态和事件处理。For example, you can use a single 例如,您可以使用单个Action
to create and coordinate a tool-bar button and a menu item that perform the same function.Action
来创建和协调执行相同功能的工具栏按钮和菜单项。
With the Swing 使用Swing Timer
class, you can implement a thread that performs an action after a delay, and optionally continues to repeat the action. Timer
类,您可以实现一个线程,该线程在延迟后执行操作,并且可以选择继续重复该操作。The action executes in the event dispatch thread.该操作在事件分派线程中执行。
Swing components have built-in support for assistive technologies. Swing组件内置了对辅助技术的支持。Your program can provide even better support by following a few rules.通过遵循一些规则,您的程序可以提供更好的支持。
Some programs need to manipulate focus — for example, to validate input, or change the tab-order of components. 有些程序需要操作焦点-例如,验证输入或更改组件的选项卡顺序。This section describes some techniques you can use to customize focus in your program.本节介绍一些可用于在程序中自定义焦点的技术。
With key bindings, you can specify how components react to user typing.通过键绑定,您可以指定组件对用户键入的反应方式。
This section describes a new modality model emerged in the Java™ SE version 6 and enables you to apply different modality types to dialog boxes.本节介绍Java™中出现的一种新的模态模型;SE版本6,允许您将不同的成像设备类型应用于对话框。
This section describes the printing capabilities for tables and explains how to add printing support to your programs.本节介绍表格的打印功能,并说明如何向程序添加打印支持。
This section describes the printing capabilities for text components and explains how to add printing support to your programs.本节介绍文本组件的打印功能,并解释如何向程序添加打印支持。
With the 使用SplashScreen
class you can close the splash screen, change the splash-screen image, obtain the image position or size, and paint in the splash screen.SplashScreen
类,您可以关闭初始屏幕,更改初始屏幕图像,获取图像位置或大小,并在初始屏幕中进行绘制。
This section describes how to add a tray icon to the system tray and apply a text tooltip, a popup menu, balloon messages, and a set of listeners associated with it.本节介绍如何将任务栏图标添加到系统任务栏,并应用文本工具提示、弹出菜单、气球消息以及与之关联的一组侦听器。
This section tells you how to fix problems you might encounter while trying to use the information in this lesson.本节介绍如何解决在尝试使用本课程中的信息时可能遇到的问题。
If you are interested in using JavaFX to create your GUI, see Using JavaFX Properties and Binding, Creating Visual Effects in JavaFX, Applying Transformations in JavaFX and Creating Transitions and Timeline Animations in JavaFX.如果您有兴趣使用JavaFX创建GUI,请参阅使用JavaFX属性和绑定、在JavaFX中创建视觉效果、在JavaVX中应用转换和在JavaFX中创建转换和时间线动画。