The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Overview

Advanced GUI Building

The Java 2D API, JavaBeans, and the Sound engine provide advanced functionality for building interesting, modular, and more usable user interfaces.

2D Graphics

The Java 2D API, introduced in JDK 1.2, gives you everything you need to enhance the appearance of your GUI with shapes, color, stylized text, foreign-language text, and image processing. The Java 2D API also introduces a printing model that gives you more control, power, and flexibility in application-level printing.

The java.awt and the java.awt.image packages are enhanced. New packages are java.awt.color, java.awt.font, java.awt.geom, and java.awt.print.

Sound

Before JDK 1.2, only applets could play sound and only one sound format was supported. JDK 1.2 adds an Applet class method, newAudioClip, that enables all kinds of programs to load and play sounds. The Sound engine in JDK 1.2 adds support for several sound formats, including AIFF, WAV, MIDI, and RMF.

JavaBeans

Introduced in JDK 1.1, JavaBeans let you build reusable and interchangeable software components that can be visually constructed and manipulated in builder tools. JavaBeans can be simple, such as pushbuttons or dialog boxes, or more complex, such as spreadsheets and calendars. Individual JavaBeans vary in functionality, but most have the following features in common: In JDK 1.2 JavaBeans includes an extensible and standard runtime containment and services protocol, as well as drag-and-drop support. When a Bean is introduced to its environment, it knows it is running inside the Java Virtual Machine (JVM) and has access to the core Java API. The protocol provides a standard way to nest Beans within other Beans and to have the nested Bean be able to access additional runtime services from its environment. Also, the environment or containing Bean can extend its capabilities directly to the nested Bean.

Drag-and-drop support means that Java and non-Java applications can readily share data. JavaBeans Drag and Drop works with the JFC accessibility API and can be extended to support diverse input devices.


Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2004 Sun Microsystems, Inc. All rights reserved.