public void handleWindowFocusEvent(boolean parentWindowActive){
  this.parentWindowActive=parentWindowActive;
synchronized (classLock) {
    if (!parentWindowActive) {
      this.browserWindowFocusedApplet=globalFocusedWindow;
    }
    if (parentWindowActive && globalFocusedWindow != this && isParentWindowChanged()) {
      globalFocusedWindow=(this.browserWindowFocusedApplet != null) ? this.browserWindowFocusedApplet : this;
    }
  }
  if (globalFocusedWindow == this && parentWindowActive) {
    responder.handleWindowFocusEvent(parentWindowActive,null);
  }
}

public void handleWindowFocusEvent ( boolean parentWindowActive ) { this . parentWindowActive = parentWindowActive ; synchronized ( classLock ) { if ( ! parentWindowActive ) { this . browserWindowFocusedApplet = globalFocusedWindow ; } if ( parentWindowActive && globalFocusedWindow != this && isParentWindowChanged ( ) ) { globalFocusedWindow = ( this . browserWindowFocusedApplet != null ) ? this . browserWindowFocusedApplet : this ; } } if ( globalFocusedWindow == this && parentWindowActive ) { responder . handleWindowFocusEvent ( parentWindowActive , null ) ; } }
when the parent window is activated this method is called for all embeddedframes in it . for the cembeddedframe which had focus before the deactivation this method triggers focus events in the following order : 1 . window_activated for this embeddedframe 2 . window_gained_focus for this embeddedframe 3 . focus_gained for the most recent focus owner in this embeddedframe the caller must not requestfocus on the embeddedframe together with calling this method .
