【正文】
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 draganddrop facilities of the native platform. The Drag and Drop (DND) API is quite challenging to use because it operates at a high level of abstraction to support the different ways in which it can work and because it is designed to operate on arbitrary datatypes, as specified by the interface. Let39。s user interface capabilities. It is both a replacement for the ponents the AWT provides and also a big step forward. When integration was the priority In the first releases of the JDK, integration with the native platform was considered a priority and so the AWT provided ponents that were implemented using the native ponents of each platform (in the Java programming vernacular, these are now known as heavyweight ponents). For example, on UNIX platforms the class was implemented with a Motif PushButton widget. The same Java application had a different appearance on each platform, but the intention was that the different implementations were functionally equivalent. Of course, this is where the problems start. For simple interfaces, the equivalence is true, but the model breaks down as plexity increases simply because the ponents are different, and they will always behave slightly differently in some situations no matter how many bugs are fixed and how many times parts of the AWT are rewritten. The other problem that cropped up by placing a priority on integration was functionality. The AWT provided only a limited set of ponents because of the lowest mon denominator approach a particular ponent or function can only be provided if it is available on every platform. A classic example is mouse buttons. Back in JDK , there was no way to distinguish between mouse button presses because the Macintosh had only one mouse button, and so every other platform had to behave as if it too supported only one mouse button. As the language became more of a platform in its own right, the approach to GUIs moved toward identical appearance and behavior across all platforms. To achieve this goal, the native ponents have to be abandoned as much as possible. But, clearly, some native code is still required. You can39。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。 畢業(yè)設(shè)計(jì)說明書 英文文獻(xiàn)及中文翻譯 班 級(jí): 學(xué)號(hào): 姓 名: