JSplitPane set resizable false

You can override the JSplitPane methodes getDividerLocation() and getLastDividerLocation and return a constant value.

JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT){
    private final int location = 100;
    {
        setDividerLocation( location );
    }
    @Override
    public int getDividerLocation() {
        return location ;
    }
    @Override
    public int getLastDividerLocation() {
        return location ;
    }
};

splitPane.setEnabled( false );

For preventing users to resize the panes you can also set the divider size to zero.

splitPane.setDividerSize(0);

Tags:

Java

Swing

Border