question: private int findWindowPosition ( String window ) { int loc = windowOrder . indexOf ( window ) ; if ( loc != - 1 ) { int i = 0 ; for ( Component c : panel . getComponents ( ) ) { if ( c instanceof ManagedWindow ) { String name = c . getName ( ) ; if ( loc < windowOrder . indexOf ( name ) ) { return i ; } } i ++ ; } } else { windowOrder . add ( window ) ; fireWindowOrderChanged ( ) ; } return panel . getComponentCount ( ) ; }
target:  Find the correct position to add a named component.