When you create a JSPlitPane, it has no dimension, so setDividerLocation(double) does not work. Use setDividerLocation(int) instead. Though these two methods have a same name, the first moves the divider proportionally according to current pane size, and the other moves it to a position given by fixed pixel distance.