Documentation

The Java™ Tutorials
Hide TOC
Using Other Swing Features使用其他Swing特性
Trail: Creating a GUI With Swing

Lesson: Using Other Swing Features课程:使用其他回转特征

Examples Index示例索引

This lesson contains a collection of how-to pages to help you use miscellaneous Swing features.本课程包含一组指导页面,可帮助您使用各种Swing功能。

How to Integrate with the Desktop Class如何与桌面类集成

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应用程序与主机平台上与特定文件类型关联的默认应用程序交互。

How to Create Translucent and Shaped Windows如何创建半透明和塑形窗口

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.本课向您展示了如何操作。

How to Decorate Components with JLayer如何使用JLayer装饰组件

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.它使您能够在不直接修改底层组件的情况下绘制组件并响应组件事件。

How to Use Actions如何使用操作

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来创建和协调执行相同功能的工具栏按钮和菜单项。

How to Use Swing Timers如何使用回转定时器

With the Swing Timer class, you can implement a thread that performs an action after a delay, and optionally continues to repeat the action. 使用Swing Timer类,您可以实现一个线程,该线程在延迟后执行操作,并且可以选择继续重复该操作。The action executes in the event dispatch thread.该操作在事件分派线程中执行。

How to Support Assistive Technologies如何支持辅助技术

Swing components have built-in support for assistive technologies. Swing组件内置了对辅助技术的支持。Your program can provide even better support by following a few rules.通过遵循一些规则,您的程序可以提供更好的支持。

How to Use the Focus Subsystem如何使用聚焦子系统

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.本节介绍一些可用于在程序中自定义焦点的技术。

How to Use Key Bindings如何使用键绑定

With key bindings, you can specify how components react to user typing.通过键绑定,您可以指定组件对用户键入的反应方式。

How to Use Modality in Dialogs如何在对话框中使用模态

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,允许您将不同的成像设备类型应用于对话框。

How to Print Tables如何打印表格

This section describes the printing capabilities for tables and explains how to add printing support to your programs.本节介绍表格的打印功能,并说明如何向程序添加打印支持。

How to Print Text如何打印文本

This section describes the printing capabilities for text components and explains how to add printing support to your programs.本节介绍文本组件的打印功能,并解释如何向程序添加打印支持。

How to Create a Splash Screen如何创建启动屏幕

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类,您可以关闭初始屏幕,更改初始屏幕图像,获取图像位置或大小,并在初始屏幕中进行绘制。

How to Use the System Tray如何使用系统托盘

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.本节介绍如何将任务栏图标添加到系统任务栏,并应用文本工具提示、弹出菜单、气球消息以及与之关联的一组侦听器。

Solving Common Problems Using Other Swing Features使用其他回转特征解决常见问题

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中创建转换和时间线动画


Previous page: Previous Lesson
Next page: How to Integrate with the Desktop Class