package bug; import com.sun.javafx.css.StyleManager; import java.util.List; import javafx.application.Application; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Node; import javafx.scene.Scene; import javafx.scene.control.Accordion; import javafx.scene.control.Button; import javafx.scene.control.ButtonBuilder; import javafx.scene.control.CheckBox; import javafx.scene.control.Label; import javafx.scene.control.MenuItem; import javafx.scene.control.Separator; import javafx.scene.control.SplitMenuButton; import javafx.scene.control.SplitMenuButtonBuilder; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.control.TitledPane; import javafx.scene.control.ToolBar; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; public class Bug extends Application { public static void main(String[] args) { launch(args); } private HBox root = new HBox(); private Scene scene; @Override public void start(Stage primaryStage) { Button bLeft = new Button("Left"); Button bRight = new Button("Right"); Node control = createControl(); root.getChildren().addAll(bLeft, control,bRight);//, traversable); root.setSpacing(50); scene = new Scene(root, 500, 500); primaryStage.setScene(scene); primaryStage.show(); } public Node createControl() { TabPane pane = new TabPane(); Tab tab = new Tab(); tab.setText("tab 1"); HBox content1 = new HBox(10); content1.getChildren().addAll(new Button("Button"), new Label("Label"), new Rectangle(40, 40, Color.TOMATO)); tab.setContent(content1); Tab tab2 = new Tab(); tab2.setText("tab 2"); tab2.setContent(new Circle(40, Color.RED)); pane.getTabs().addAll(tab, tab2); pane.setFocusTraversable(false); return pane; } }