< prev index next >

src/java.desktop/share/classes/java/awt/DefaultKeyboardFocusManager.java

Print this page

        

*** 794,803 **** --- 794,804 ---- * * @param e the KeyEvent to be dispatched * @return <code>true</code> * @see Component#dispatchEvent */ + @SuppressWarnings("deprecation") public boolean dispatchKeyEvent(KeyEvent e) { Component focusOwner = (((AWTEvent)e).isPosted) ? getFocusOwner() : e.getComponent(); if (focusOwner != null && focusOwner.isShowing() && focusOwner.canBeFocusOwner()) { if (!e.isConsumed()) {
*** 1019,1028 **** --- 1020,1030 ---- synchronized(this) { typeAheadMarkers.clear(); } } + @SuppressWarnings("deprecation") private boolean preDispatchKeyEvent(KeyEvent ke) { if (((AWTEvent) ke).isPosted) { Component focusOwner = getFocusOwner(); ke.setSource(((focusOwner != null) ? focusOwner : getFocusedWindow())); }
< prev index next >