mainPane.setResizeWeight(1);
if (lastMove != -1)  { mainPane.setDividerLocation(lastMove); mainPane.setResizeWeight(0); } else mainPane.setResizeWeight(1);
    private JSplitPane createSplitPane(JComponent browserUI,                                        JComponent clipBoardUI)    {        mainPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, browserUI,                                     clipBoardUI);        mainPane.setOneTouchExpandable(true);        mainPane.setContinuousLayout(true);        mainPane.setResizeWeight(1); //before we remove items.        return mainPane;    }