import com.sun.javafx.runtime.VersionInfo; import java.time.*; import javafx.application.Application; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class RT31132 extends Application { DatePicker datePicker = new DatePicker(LocalDate.of(2015, Month.JANUARY, 28)); @Override public void start(Stage primaryStage) { HBox container = new HBox(20.0); ComboBox comboBox = new ComboBox(); comboBox.setEditable(true); container.getChildren().addAll(new Button("Left"), datePicker, comboBox, new Button("Right")); VBox root = new VBox(5); root.getChildren().add(container); CheckBox traversable = new CheckBox("Focus traversable"); traversable.setSelected(datePicker.isFocusTraversable()); traversable.selectedProperty().addListener(new ChangeListener() { @Override public void changed(ObservableValue observable, Boolean oldValue, Boolean newValue) { datePicker.setFocusTraversable(newValue); comboBox.setFocusTraversable(newValue); } }); root.getChildren().add(traversable); Scene scene = new Scene(root, 300, 250); primaryStage.setTitle(VersionInfo.getRuntimeVersion()); primaryStage.setScene(scene); primaryStage.show(); } public static void main(String[] args) { launch(args); } }