To reproduce run following code
import javafx.application.Application;
import javafx.builders.FlowPaneBuilder;
import javafx.builders.PaneBuilder;
import javafx.builders.SplitPaneBuilder;
import javafx.builders.TilePaneBuilder;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
public class SplitPanePadding extends Application {
public static void main(String[] args) {
launch(args);
}
private Parent getContent() {
VBox list = new VBox();
list.setManaged(false);
SplitPane pane = SplitPaneBuilder.create().items(
TilePaneBuilder.create().children(new Rectangle(40, 40, Color.WHITESMOKE)).build(),
FlowPaneBuilder.create().children(new Rectangle(40, 40, Color.BLUE)).build(),
PaneBuilder.create().children(new Rectangle(40, 40, Color.RED)).build())
.prefWidth(150)
.prefHeight(150)
.maxWidth(150)
.maxHeight(150)
.build();
pane.setDividerPositions(0.33, 0.67);
pane.setFocusTraversable(false);
pane.setStyle("-fx-border-color:green;");
pane.setMaxSize(150,150);
list.getChildren().addAll(pane);
return list;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
Scene scene = new Scene(getContent(),800,300);
stage.setScene(scene);
stage.setVisible(true);
}
}
import javafx.application.Application;
import javafx.builders.FlowPaneBuilder;
import javafx.builders.PaneBuilder;
import javafx.builders.SplitPaneBuilder;
import javafx.builders.TilePaneBuilder;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
public class SplitPanePadding extends Application {
public static void main(String[] args) {
launch(args);
}
private Parent getContent() {
VBox list = new VBox();
list.setManaged(false);
SplitPane pane = SplitPaneBuilder.create().items(
TilePaneBuilder.create().children(new Rectangle(40, 40, Color.WHITESMOKE)).build(),
FlowPaneBuilder.create().children(new Rectangle(40, 40, Color.BLUE)).build(),
PaneBuilder.create().children(new Rectangle(40, 40, Color.RED)).build())
.prefWidth(150)
.prefHeight(150)
.maxWidth(150)
.maxHeight(150)
.build();
pane.setDividerPositions(0.33, 0.67);
pane.setFocusTraversable(false);
pane.setStyle("-fx-border-color:green;");
pane.setMaxSize(150,150);
list.getChildren().addAll(pane);
return list;
}
public void start(Stage stage) {
stage.setX(100);
stage.setY(100);
Scene scene = new Scene(getContent(),800,300);
stage.setScene(scene);
stage.setVisible(true);
}
}