можно.
Если кнопка обычная, то вот основа.
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
/**
* Created by Evgeny on 18.03.2016.
*/
public class Example extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane borderPane = new BorderPane();
SplitPane splitPane1 = new SplitPane();
Button button_changeContainer = new Button("Изменить контейнер");
splitPane1.getItems().add(button_changeContainer);
SplitPane splitPane2 = new SplitPane();
splitPane2.getItems().addAll(new Label("Первый"),new Label("Контейнер"), new Label("SplitPane"));
VBox vBox = new VBox();
vBox.getChildren().addAll(new Label("Второй"),new Label("Контейнер"), new Label("VBox"));
borderPane.setCenter(splitPane1);
borderPane.setRight(splitPane2);
button_changeContainer.setOnAction(new EventHandler<ActionEvent>() {
boolean firstOrSecond = true;
@Override
public void handle(ActionEvent event) {
firstOrSecond = !firstOrSecond;
if(firstOrSecond){
borderPane.setRight(splitPane2);
}
else borderPane.setRight(vBox);
}
});
primaryStage.setScene(new Scene(borderPane));
primaryStage.setWidth(600);
primaryStage.setHeight(600);
primaryStage.show();
}
}