dispatchEvent( comp, new FocusEvent( comp, FocusEvent.FOCUS_GAINED, false, oldFocusOwner ) );
if ( comp != null ) { dispatchEvent( comp, new FocusEvent( comp, FocusEvent.FOCUS_GAINED, false, oldFocusOwner ) ); }
    public void setFocusOwner( Component comp ) {        if ( comp == null || comp.isFocusable() ) {            awtWindow.setFocusableWindowState( true );            Component oldFocusOwner = getFocusOwner();            if ( oldFocusOwner != comp ) {                if ( oldFocusOwner != null ) {                    dispatchEvent( oldFocusOwner, new FocusEvent( oldFocusOwner,                            FocusEvent.FOCUS_LOST, false, comp ) );                }                dispatchEvent( comp, new FocusEvent( comp,                        FocusEvent.FOCUS_GAINED, false, oldFocusOwner ) );            }            awtWindow.setFocusableWindowState( false );        }    }