List of usage examples for javafx.scene.control TabPane prefWidthProperty
public final DoubleProperty prefWidthProperty()
From source file:org.jamocha.gui.JamochaGui.java
private Scene generateScene() { final TabPane tabPane = new TabPane(); tabPane.setSide(Side.LEFT);/*from www.j av a 2 s . com*/ this.log = new TextArea(); final Tab logTab = new Tab("Log"); logTab.setContent(this.log); logTab.setClosable(false); final Tab networkTab = new Tab("Network"); networkTab.setClosable(false); final ScrollPane scrollPane = new ScrollPane(); networkTab.setContent(scrollPane); this.networkVisualisation = new NetworkVisualisation(this.jamocha.getNetwork()); this.networkVisualisation.setTranslateX(10); this.networkVisualisation.setTranslateY(10); this.networkVisualisation.update(); scrollPane.setContent(this.networkVisualisation); tabPane.getTabs().addAll(logTab, networkTab); final Scene scene = new Scene(tabPane); tabPane.prefHeightProperty().bind(scene.heightProperty()); tabPane.prefWidthProperty().bind(scene.widthProperty()); return scene; }