public void setDividerFractions(double[] fractions) { int[] dividerLocations = new int[fractions.length]; double h = centerSplitPane.getHeight(); for (int i = 0; i < fractions.length; i++) { dividerLocations[i] = (int) Math.round(h * fractions[i]); } centerSplitPane.setDividerLocations(dividerLocations); }
@Override public void setDividerLocations(@px @Nonnull int[] locations) { super.setDividerLocations(locations); if (!hasBeenPainted) { this.dividerLocationsToApply = locations.clone(); } }
centerSplitPane.setDividerLocations(dividerLocations); centerSplitPane.invalidate();