【正文】
o use all the systeminstalled fonts The ability to apply the same operations (rotation, scaling, painting, clipping, and so on) to text as to graphic objects Support for adding embedded attributes to strings (such as font, size, weight, and even images) Support for bidirectional text (to enable righttoleft character runs like you would encounter in Arabic and Hebrew) Primary and secondary cursors that can navigate through text containing both righttoleft and lefttoright character runs Advanced fontmeasurement capabilities, surpassing those of the old class Layout capabilities to wordwrap and justify multiline text Multimedia options: Java Media APIs The Java Media APIs are a set of resources covering an extensive range of multimedia technologies. Some of them, such as the 2D and sound APIs, are part of the core J2SE platform。t make a window appear on UNIX without X System Window calls being involved. Enter Swing, which achieved this goal by making use of a subset of the AWT, including the basic drawing operations and the certain classes in the package: Container, Window, Panel, Dialog, and Frame. Best of all possible approaches Swing does not pletely follow the Java language as a platform route. Instead, it bines the best of both approaches by offering a bridge back to the native platforms. The mechanism for establishing this bridge is referred to as Pluggable LookandFeels (which is pretty close to the concept of themes, popular in the Linux munity). Each Swing ponent has a model of its functionality and a separate appearance (the lookandfeel), which can be set in advance or changed on the fly. Swing provides a Java lookandfeel (previously known as Metal), separate ones for the Windows and Motif platforms, and one for the Macintosh platform (as an extra option). The platform lookandfeels don39。ll explore this progression, examine the capabilities of the current version in detail, and finish by looking to the future to see what release will offer. Prior to the release of the Java 2 platform, the Abstract Window Toolkit (AWT) was the extent of the Java platform39。s graphical capabilities. Various technologies, such as Swing, were introduced as optional extensions. With the Java 2 platform, most of these extensions have found their way into the core as part of the Java Foundation Classes (JFC). JFC refers to the entire set of graphical and user interface technologies included in the Java 2 platform, including AWT and Swing. In this article, we39。t use the native ponents of the platform like the AWT does. Instead, they use lightweight ponents that are drawn to have the same appearance as the native ponents. This is good for functionality, but there are always some differences in look or behavior, so plex interfaces will never be identical to ones that use native ponents. Furthermore, you can roll your own lookandfeel, which is a great ability to have when crafting one for highly specialized applications or when providing a corporate lookandfeel across a range of applications. Platformindependent drag and drop JDK added a general mechanism, found in the package, that enabled the transferring of data between and within applications, as well as the ability to manipulate the system clipboard. The package was introduced in the Java 2 version. This package builds on the datatransfer mechanism by providing draganddrop facilities that can operate in a platformindependent manner within a single Java application or between two Java applications. It can also behave in a platformdependent manner in order to integrate with the