private JInternalFrame getSelectedFrame ( ) { JInternalFrame [ ] frames = desk . getAllFrames ( ) ; for ( int i = 0 ; i < frames . length ; i ++ ) { if ( frames [ i ] . isShowing ( ) ) { return frames [ i ] ; } } return frames [ frames . length - 1 ] ; }
Returns the current selected internal frame .