Run this code and press the Tab key some times, after second press the focus is absent on any of the Accordion,
it's appears only when the Combobox is in accordion
@Override
public void start(Stage primaryStage) {
Accordion accordion1 = new Accordion();
TitledPane pane1 = new TitledPane("Title 1", new Label("Text Content"));
accordion1.getPanes().add(pane1);
Accordion accordion2 = new Accordion();
final ComboBox combo = new ComboBox();
TitledPane pane2 = new TitledPane("Title 2", VBoxBuilder.create().
children(combo).build());
accordion2.getPanes().add(pane2);
FlowPane flow = new FlowPane();
flow.getChildren().addAll(accordion1, accordion2);
Scene scene = new Scene(flow, 500, 500);
primaryStage.setScene(scene);
primaryStage.setTitle(VersionInfo.getRuntimeVersion());
primaryStage.show();
}
it's appears only when the Combobox is in accordion
@Override
public void start(Stage primaryStage) {
Accordion accordion1 = new Accordion();
TitledPane pane1 = new TitledPane("Title 1", new Label("Text Content"));
accordion1.getPanes().add(pane1);
Accordion accordion2 = new Accordion();
final ComboBox combo = new ComboBox();
TitledPane pane2 = new TitledPane("Title 2", VBoxBuilder.create().
children(combo).build());
accordion2.getPanes().add(pane2);
FlowPane flow = new FlowPane();
flow.getChildren().addAll(accordion1, accordion2);
Scene scene = new Scene(flow, 500, 500);
primaryStage.setScene(scene);
primaryStage.setTitle(VersionInfo.getRuntimeVersion());
primaryStage.show();
}