layoutManager.invalidateLayout(splitPane);
getSplitPane().setLayout(layoutManager);
  protected void resetLayoutManager()  {    if (getOrientation() == JSplitPane.HORIZONTAL_SPLIT)      layoutManager = new BasicHorizontalLayoutManager();    else      layoutManager = new BasicVerticalLayoutManager();    layoutManager.invalidateLayout(splitPane);    layoutManager.updateComponents();    getSplitPane().setLayout(layoutManager);    // invalidating by itself does not invalidate the layout.    getSplitPane().revalidate();  }