Buggy code:
public final class GamePanel extends ChessPanel { private final Game mGame ; private final SquareConfig mSquareConfig ; private final BoardPanel [ ] mGameBoards ; private final List < TeamStatusPanel > mTeamStatusPanels ; private final JTabbedPane mTabbedPane ; private final JButton mUndoButton ; private final JButton mForwardButton ; private final JButton mBackButton ; public GamePanel ( @ NotNull GlassPane glassPane , @ NotNull Game game ) { } private void initComponents ( ) { setLayout ( new BoxLayout ( this , BoxLayout . LINE_AXIS ) ) ; Board [ ] boards = mGame . getBoards ( ) ; JPanel boardPanels = new JPanel ( ) ; boardPanels . setOpaque ( false ) ; boardPanels . setLayout ( new BoxLayout ( boardPanels , BoxLayout . LINE_AXIS ) ) ; boardPanels . addComponentListener ( new ComponentListener ( ) { @ Override public void componentResized ( ComponentEvent e ) { Stream . of ( mGameBoards ) . forEach ( ( board ) -> board . updateDimensions ( e . getComponent ( ) . getWidth ( ) , e . getComponent ( ) . getHeight ( ) ) ) ; } @ Override public void componentMoved ( ComponentEvent e ) { } @ Override public void componentShown ( ComponentEvent e ) { } @ Override public void componentHidden ( ComponentEvent e ) { } } ) ; IntStream . range ( 0 , boards . length ) . forEach ( ( boardIndex ) -> { mGameBoards [ boardIndex ] = new BoardPanel ( boards [ boardIndex ] . getBoardSize ( ) , mSquareConfig , ( coordinate ) -> { Piece piece = mGame . getPiece ( boardIndex , coordinate ) ; if ( ( piece != null ) && ( ( piece . getTeamId ( ) ) == ( mGame . getTurnKeeper ( ) . getActiveTeamId ( ) ) ) ) { return mGame . getMovesFrom ( boardIndex , coordinate ) ; } else { return Collections . emptySet ( ) ; } } ) ; boardPanels . add ( mGameBoards [ boardIndex ] ) ; } ) ; Stream . of ( mGame . getTeams ( ) ) . forEach ( ( team ) -> mTeamStatusPanels . add ( new TeamStatusPanel ( team ) ) ) ; mTeamStatusPanels . forEach ( ( panel ) -> mTabbedPane . addTab ( panel . getName ( ) , panel ) ) ; mUndoButton . addActionListener ( ( event ) -> { mGame . undoMove ( ) ; refresh ( ) ; } ) ; mForwardButton . addActionListener ( ( event ) -> { mGame . nextMove ( ) ; refresh ( ) ; } ) ; mBackButton . addActionListener ( ( event ) -> { mGame . previousMove ( ) ; refresh ( ) ; } ) ; GridBagConstraints gbc = new GridBagConstraints ( ) ; JPanel detailsPanel = new JPanel ( ) ; detailsPanel . setLayout ( new GridBagLayout ( ) ) ; detailsPanel . setOpaque ( false ) ; gbc . gridwidth = 2 ; gbc . weightx = 1.0 ; gbc . fill = GridBagConstraints . BOTH ; gbc . weighty = 1.0 ; gbc . insets = new Insets ( 0 , 10 , 10 , 10 ) ; detailsPanel . add ( mTabbedPane , gbc ) ; gbc . gridy = 1 ; gbc . gridx = 0 ; gbc . gridwidth = 2 ; gbc . weighty = 0.0 ; detailsPanel . add ( mUndoButton , gbc ) ; gbc . gridy = 2 ; gbc . gridx = 0 ; gbc . gridwidth = 1 ; detailsPanel . add ( mBackButton , gbc ) ; gbc . gridx = 1 ; detailsPanel . add ( mForwardButton , gbc ) ; JSplitPane splitPane = new JSplitPane ( JSplitPane . HORIZONTAL_SPLIT , boardPanels , detailsPanel ) ; splitPane . setPreferredSize ( new Dimension ( 755 , 475 ) ) ; <START_BUG> splitPane . setDividerLocation ( 350 ) ; <END_BUG> splitPane . setOpaque ( false ) ; splitPane . setDividerSize ( 1 ) ; splitPane . setResizeWeight ( 0.55 ) ; splitPane . setEnabled ( false ) ; add ( splitPane ) ; refresh ( ) ; } public void declareDraw ( ) { } public void endOfGame ( ) { } public void saveGame ( ) { } private void playMove ( MoveBuilder moveBuilder ) { } private void createPromotionPopup ( MoveBuilder moveBuilder ) { } private void refresh ( ) { } private void refreshStatus ( ) { } private void refreshBoard ( ) { } private void refreshNavigationButtonState ( ) { } }

Fix:
splitPane . setDividerLocation ( 375 ) ;