question: private void adjustAlignment ( int align , int curAlign ) { if ( ( ! FIXED_WIDTH ) && ( align != curAlign ) ) { if ( curLine . getComponentCount ( ) == 0 ) { curLine . setLayout ( new FlowLayout ( curAlign ) ) ; } } }
target:  The following replaces the layout of the curLine container with the correct alignment, in non fixed width alignment is done by flowlayout's orientation. In case the line is not empty, a new line will be opened by newLineIfNotEmpty below