Index: javax/swing/SwingUtilities.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v retrieving revision 1.39 diff -u -r1.39 SwingUtilities.java --- javax/swing/SwingUtilities.java 8 Nov 2005 20:35:43 -0000 1.39 +++ javax/swing/SwingUtilities.java 17 Dec 2005 00:22:06 -0000 @@ -1395,4 +1395,30 @@ else return null; } + + /** + * Processes key bindings for the component that is associated with the + * key event. Note that this method does not make sense for + * JComponent-derived components, except when + * address@hidden JComponent#processKeyEvent(KeyEvent)} is overridden and super is + * not called. + * + * This method searches through the component hierarchy of the component's + * top-level container to find a JComponent that has a binding + * for the key event in the WHEN_IN_FOCUSED_WINDOW scope. + * + * @param ev the key event + * + * @return true if a binding has been found and processed, + * false otherwise + * + * @since 1.4 + */ + public static boolean processKeyBindings(KeyEvent ev) + { + Component c = ev.getComponent(); + KeyStroke s = KeyStroke.getKeyStrokeForEvent(ev); + KeyboardManager km = KeyboardManager.getManager(); + return km.processKeyStroke(c, s, ev); + } }