public synchronized Panel setLayoutManager ( LayoutManager layoutManager ) { if ( layoutManager == null ) { layoutManager = new AbsoluteLayout ( ) ; } this . layoutManager = layoutManager ; invalidate ( ) ; return this ; }
Assigns a new layout manager to this panel replacing the previous layout manager assigned . Please note that if the panel is not empty at the time you assign a new layout manager the existing components might not show up where you expect them and their layout data property might need to be re - assigned .