code: public synchronized Panel setLayoutManager(LayoutManager layoutManager) {
          if(layoutManager == null) {
              layoutManager = new AbsoluteLayout();
          }
          this.layoutManager = layoutManager;
          invalidate();
          return this;
      }
docs: 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.
  @param layoutManager New layout manager this panel should be using
  @return Itself