JDK1.1 - AWT Enhancements
The AWT in JDK1.1 is targeted at providing major quality improvements while introducing the beginnings of a richer infrastructure for larger-scale GUI development. Although we are introducing enhancements and changes to the overall API, we will maintain backward compatibility with the 1.0 API so that existing applets will continue to run.
A number of the AWT changes and enhancements are aimed at the needs of tool developers. Good software tools are fundamental to the usability and success of Java technology. Additionally, the AWT in 1.1 will support the JavaBeans architecture. In fact, all AWT components in 1.1 are "simple" Java Beans.
The 1.1 AWT contains a wide range of improvements, including a complete rewrite of the Win32 implementation. This document, however, focuses on API changes:
Note that these APIs may be modified for the final release of the JDK1.1 as a result of more complete testing and feedback from real-world usage by Java developers. We will update these documents periodically to reflect such changes (see Recent Updates).
To see our plans for the future, go to
AWT: The Next Generation.
We welcome your feedback!
The following modifications were made to the documents in response to the feedback we've received so far (many thanks to those of you who have taken the time to send us your feedback - it makes a difference!):
February 4, 1997
- Updated examples so that they compile cleanly.
January 29, 1997
- Added "Lightweight UI Framework" document.
January 3, 1997
- Delegation Event Model
- Added new TextEvent/TextListener classes to enable getting text value changed events on text components.
- Added new windowActivated/windowDeactivated event types to WindowEvent to enable programs to determine when a window gets/loses focus.
- Added isTemporary() method to FocusEvent in order to enable determining the difference between when focus is explicited moved between components and when focus *temporarily* changes (such as when a window is de-activated).
- Added new ContainerEvent/ContainerListener classes in order to enable notification when components are added/removed from containers. This makes it relatively easy for containers to register themselves as listeners for events on all of their descendents.
- Changed the way input event consumption works: now there is a new consume() method on InputEvent so that any object can "consume" an input event (previously only subclasses could do this).
- Made the AWTEventMulticaster class public so that it can be reused by component subclasses who wish to act as multicast sources for AWT defined events.
- Made java.awt.event Adapter classes abstract to be clearer that they
are intended to be extended.
- Removed obsoleted constructors in java.awt.event Event classes which took
an old 1.0 event as a parameter.
- Changed the event id values of the ComponentEvent types to prevent them
from clashing with the WindowEvent ids.
- Added virtual keycode identifiers to java.awt.event.KeyEvent in order
to properly represent all standard keys on the keyboard. The keyCode
property of the key event will now contain one of those identifiers
(instead of the ascii integer equivelent).
- Changed the ItemSelectable interface so that it doesn't force items to be
represented by a string. Specifically, the getSelectedIndexes and
getSelectedItems methods have been replaced by a getSelectedObjects method
that returns an array of Objects.
- Updated our statement on "Compatibility" and how mixing of the 1.0 and 1.1 works.
- Popup Menu
- Added isPopupTrigger() method to java.awt.event.MouseEvent in order provide a platform-indendent mechanism for determining whether a mouse event should show a popup menu on a given platform.
- Updated example to use 1.1 event model and isPopupTrigger() method.
December 11, 1996
- Next Generation: Added link to document that describes future plans.
November 21, 1996
- Desktop Colors
- Moved desktop colors into new SystemColor class
(since they are a special type of color).
- Graphics and Images: First release of these specifications.
October 25, 1996
- Delegation Event Model
- Re-worked the section on "Handling Events in Extended Components" in order to provide more flexibility in how to override methods to handle events in subclasses.
- Added a system event queue object in order to allow central access/view of all incoming events
- Simplified the AdjustmentListener and ItemListener interfaces to contain only a single method
- Removed all 3 semantic Adapter classes, since each of the semantic listeners now only has a single method
Many people contributed to the ideas and designs in these documents. In particular we'd like to recognize the following people (in alphabetical order): Tom Ball, Larry Cable, Amy Fowler, Jim Graham, Graham Hamilton, Herb Jellinek, Jonni Kanerva, Tim Prinzing, Blake Sullivan, Carl Quinn, Arthur Van Hoff.
- Copyright © 1996, 1997 Sun Microsystems, Inc.
- Last updated January 31, 1997
send feedback to: email@example.com