I want to resize the pane only manually dragging the splitter with the mouse. But when the window is resized, I would like that pane to keep the exact size that I chose. Allowing the other pane to change size freely.
Do you think of any way to accomplish this?
You should use SplitPane.setResizableWithParent static method.
        SplitPane root = new SplitPane();
        final Pane paneFixed = new StackPane();
        paneFixed.getChildren().add(new Text("fixed"));
        SplitPane.setResizableWithParent(paneFixed, Boolean.FALSE);
        Pane paneFree = new StackPane();
        paneFree.getChildren().add(new Text("free"));
        root.getItems().addAll(paneFree, paneFixed);
        stage.setScene(new Scene(root, 300, 200));
        stage.show();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With