|
Contents
Overview of Java Foundation Classes (JFC) Features
Abstract Window Toolkit (AWT) - APIs that enable programs to integrate into the native desktop window system, including APIs for Drag and Drop. Java 2D - APIs to enable advanced 2D graphics, imaging, text and printing. Swing GUI Components - APIs that extend the AWT to provide a rich, extensible GUI component library with a pluggable look and feel. Accessibility - APIs and assistive technologies are for ensuring an application is accessible to users with disabilities and meets government requirements for accessibility. Internationalization - All JFC technologies include support for creating applications that can interact with users around the world using the user's own language and cultural conventions. This includes the Input Method Framework API. These five technologies are designed to be used together to enable you to build fully functional GUI client applications that run and integrate on any client machine that supports the J2SE platform, including Microsoft Windows, Solaris, Linux, and Mac OSX. Note: The most recent release containing JFC API is Java 2 SDK, Standard Edition, (J2SE) v 1.4 and is available for Microsoft Windows, Solaris, and Linux. Visit www.apple.com/java to find the latest information on J2SE platform support for OSX. Choosing Between HTML and Rich Client: One Size Does Not Fit All
When you're choosing a technology to construct GUI client programs, it's important to choose one that best fits the goals and parameters of the project. This is particularly true when deciding between authoring an HTML-based Web client and a traditional client application (such as a JFC client). Each client type has its place. Many factors play a role in this decision, including the technical expertise of your development team, market trends, and legacy code. However, one of the most important considerations should be the user experience your client will provide, as this may ultimately be the deciding factor in whether your customer chooses your product or your competitor's. Since JFC clients can also be deployed over the Web, Web access should not be the sole deciding factor. The following guidelines can be used to make the choice based on how the user needs to use your client to get useful work done. HTML clients are particularly good in the following circumstances:
Rich clients should be considered in the following scenarios:
Although most people tend to associate "Web" clients with HTML, it's important to understand that "Web" applications can also be built with J2SE technology, since JFC applications can be both easily deployed over the Web and can communicate over the Web using HTTP APIs in the J2SE platform. (We demonstrated this at our JavaOne 2000 talk, Building JFC-based WebAwareWare. Fortunately, regardless of which client type is more appropriate for your project, there are Java technologies for both. The Java 2 SDK, Enterprise Edition (J2EE) platform includes the JavaServer Pages technology, which makes it easy to construct dynamic content on the Web, including HTML clients. The J2SE platform provides the JFC APIs for building rich, Web-deployed clients. Either way, it's Java technology. Deploying JFC Applications on the Web: Applets or Applications
J2SE client programs can be easily deployed over the Web as either applets or applications. Applets are programs designed to run within the bounds of the client Browser window and typically run in the same process space as the browser. Applets are deployed into todays browsers using Java Plug-in technology. Java applications are programs that do not run within the browser, but instead run in their own process space as standalone applications. However, they can still be easily deployed over the Web using a technology called Java Web Start. In considering whether you should write an applet or an application, consider the goals you are trying to achieve with your client. If you need to provide a user experience that integrates closely with the browser and intend to display your GUI within an HTML page, then an applet is likely the right choice. If your program will be popping up indepdenent top-level windows and does not need to integrate directly with the browser, then a Web-started application is the right choice. Building Rich Clients for Web Services: Bringing Interactivity to the Web
Web services technology has emerged as the next programming paradigm for getting work done on the Web. The Java 2 SDK, Enterprise Edition (J2EE) platform is a foundation for creating the server side of Web services with products like the Java Web Services Developer Pack. Equally exciting is the potential for building rich, interactive Java technology-based clients for these Web services, and the JFC technology, together with the XML technologies in the J2SE platform, is perfectly suited to this task. JFC technology provides advantages over other client technologies because:
"Rich Clients for Web Services" has been a major theme at the last few JavaOne conferences. Visit the PDF conference slides for these presentations at Rich Clients for Web Services (The Sequel), JavaOne 2002 and Rich Clients for Web Services, JavaOne 2001. JFC/Swing: Interacting with the User
The Swing toolkit is a fully-featured UI component library implemented entirely in the Java programming language. The J2SE platform's javax.swing package uses the windowing functionality of AWT and the rendering capabilities of the Java 2D API to provide sophisticated and highly extensible UI components that comply with the JavaBeans specification. The Swing UI components are categorized below:
The Swing components use other JFC features, such as drag and drop, the accessibility APIs, and the J2SE platform's internationalization support to create fully featured UI functionality out of the box. Swing also includes the To get more detailed technical information on using the Swing APIs, visit The Swing Connection. For a guide to programming with the Swing APIs that includes dozens of complete examples, visit The Swing Tutorial. Demo Pluggable Look and Feel: Adapting to User Expectations
Finally, Swing supports a feature known as the Pluggable look and feel. This enables the Swing GUI components to support different look and feels while maintaining a consistent API for the component, allowing developers to code their application GUI once and run it in multiple look and feels. In the J2SE platform, Swing provides a Java technology look and feel that is consistent across platforms (the default), as well as native-platform look and feels for Microsoft Windows and Motif (Linux/GTK is in the works). Apple provides their own Swing Aqua look and feel for Mac OSX. Applications can choose between running the Java technology look and feel or picking up the appropriate platform-native look and feel at runtime.
The Swing Pluggable look and feel API is designed to be extended so that developers can create custom look and feels. This is sometimes desirable to achieve a particular branding for an application. To see some examples of custom look and feels, see Kunstoff and Alloy Look and Feels, L2F's look and feels, and Compiere. Java 2D: Producing Eye-Catching Visuals
The Java 2D API is a set of classes for advanced 2D graphics, imaging and printing. The API combines support for line art, text, and images into a single comprehensive model. The capabilities of Java 2D enable programs to produce jaw-dropping visuals. The API provides extensive support for image compositing, coordinate transformations, a set of classes to provide accurate color space definition and conversion, a rich set of display-oriented imaging operators, complex text layout, and printing. For more information, see the Java 2D API Home Page Demo Printing: Putting It on Paper
Java 2D technology includes extensive APIs for generating and sending high-quality output to printing devices. See the Java Printing home page for further information on printing on the Java platform. Abstract Window Toolkit (AWT): APIs for Integrating with the Desktop
The AWT has provided the core underpinnings for Java applications since Java 1.0 was introduced. The java.awt package contains the base-level APIs that allow Java applications to interact with the native window system on each platform. These APIs include support for creating and managing windows (discrete areas on the display), getting input events on those windows, managing input focus, and rendering simple graphics. The AWT also includes a set of simple GUI components that map directly to the native widget counterparts on the given platform. The AWT components provided are: Button, CheckBox, Choice(combobox), List, TextField, TextArea(no styled text), Label, Scrollbar, and ScrollPane. Because the implementation of these components rely on native widget code, they cannot be easily extended and sometimes behave inconsistently across platforms. For this reason, it is generally recommended to use the Swing UI components instead. Drag and Drop: Accelerating Data Transfer
The java.awt.dnd and java.awt.datatransfer packages provide APIs for implementing Java applications with drag and drop capabilities. Drag and drop is a widely accepted (and expected) paradigm for communicating or transferring data within or between applications. The drag and drop API interfaces with the native drag and drop protocol on the given platform to enable this feature between Java and native applications, as well as across or within Java applications. By default, both the AWT and Swing GUI components support drag and drop capabilities in standard ways. The drag and drop API provides a mechanism for developers to either extend the way drag and drop is supported in the existing components, or implement custom drag and drop behavior in the app. Applications using the standard GUI component set should not need to use the API at all, it just works. For information on how to use drag and drop with Swing components in release 1.4 and later, see the Swing Data Transfer section of the release notes. You can also check out the original Drag and Drop specification, which is part of JavaBeans technology. Accessibility: Supporting People with Disabilities
The Accessibility API included The unparalleled accessibility built into the JFC software makes it possible for software vendors to satisfy a large and growing need in government, state, and commercial markets. As a result, applications developed using JFC software will help customers meet federal regulations on accessibility, making these applications more attractive to a larger number of important market segments. For more information on accessibility, browse the online accessibility documentation. Internationalization: Supporting Users World-Wide
All of the JFC technologies in the J2SE platform are fully internationalized, so developers can easily build applications that can interact with users around the world using the user's own language and cultural conventions. Information on internationalization can be found in the J2SE V1.4 Internationalization Guide. Input Method Framework: Accepting Text Input from Eastern Languages
The input method framework enables the collaboration between text editing components and input methods for entering text. Input methods are software components that let the user enter text in ways other than simple typing on a keyboard. They are commonly used to enter Japanese, Chinese, or Korean-languages using thousands of different characters-on keyboards with far fewer keys. For more details, see the Input Method Framework Guide. |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.
|
| ||||||||||||