public void internalFrameActivated(InternalFrameEvent e){
  if (e.getSource() == controlPanel) {
    activeFrame=CONTROL_PANEL_INDEX;
  }
 else   if (e.getSource() == addressPanel) {
    activeFrame=ADDRESS_PANEL_INDEX;
  }
 else   if (e.getSource() == functionPanel) {
    activeFrame=FUNCTION_PANEL_INDEX;
  }
}

public void internalFrameActivated ( InternalFrameEvent e ) { if ( e . getSource ( ) == controlPanel ) { activeFrame = CONTROL_PANEL_INDEX ; } else if ( e . getSource ( ) == addressPanel ) { activeFrame = ADDRESS_PANEL_INDEX ; } else if ( e . getSource ( ) == functionPanel ) { activeFrame = FUNCTION_PANEL_INDEX ; } }
listen for the activation of an internal frame record this property for correct processing of the frame cycling key .
