void () { float proportion = myPreviousProportion > 0 ? myPreviousProportion : getSplitterInitialProportion(); int firstSize = mySplitter.isVertical() ? mySplitter.getFirstComponent().getHeight() : mySplitter.getFirstComponent().getWidth(); // !! order is important! first fix mySplitter.fixFirst(); myListener.on((int)((1 - proportion) * firstSize / proportion)); mySplitter.setSecondComponent(myDetailsComponent.getPanel()); mySplitter.revalidate(); mySplitter.repaint(); mySplitter.setResizeEnabled(true); }