package test.scenegraph.app; import javafx.application.Application; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.layout.Pane; import javafx.stage.Stage; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.ScrollBarBuilder; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.control.TitledPane; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; public class ShortAppWithoutDependencies51111 extends Application { public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage stage) { Pane mainContainer = new Pane(); HBox pane = new HBox(); pane.setStyle("-fx-border-color: red;"); mainContainer.getChildren().add(pane); //pane.setPadding(new Insets(24)); pane.setAlignment(Pos.BASELINE_RIGHT); //pane.getChildren().add(createControl1()); pane.getChildren().add(createControl2()); pane.getChildren().add(createControl3()); stage.setScene(new Scene(mainContainer, 500, 500)); stage.show(); } public Node createControl1() { TitledPane tpane = new TitledPane(); VBox content = new VBox(5); content.getChildren().addAll(new Label("Label")); tpane.setContent(content); tpane.setAnimated(false); return tpane; } public Node createControl2() { TabPane pane = new TabPane(); Tab tab = new Tab(); tab.setText("tab 1"); HBox content1 = new HBox(10); content1.getChildren().addAll(new Label("Label"), new Rectangle(40, 40, Color.TOMATO)); tab.setContent(content1); pane.getTabs().add(tab); pane.setFocusTraversable(false); return pane; } public Node createControl3() { return ScrollBarBuilder.create().value(45).min(0).max(100).focusTraversable(false).build(); } }