Java

Keyboard Binding

Other Swing Changes

New Keyboard Binding Infrastructure

The new keyboard binding infrastructure unifies and replaces the two previously existing schemes for binding user input (for example, Control-S) to program actions (for example, saving a file). The Swing Connection article Keyboard Bindings in Swing has details about the old and new keyboard binding schemes, including example code.

The API changes for the new infrastructure center around two new classes -- ActionMap and InputMap. Other changes include new methods in JComponent, LookAndFeel, and SwingUtilities, as well as a few new special-purpose classes that descend from ActionMap and InputMap.

See:

New methods in JComponent:

New methods in LookAndFeel:

New methods in SwingUtilities:


Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: swing-feedback@java.sun.com. This is not a subscription list.
Sun
Java Software